I would like to send a message on all text channels of my private discord server using a bot.
I have connected and can have a Session
object but I'm not sure how to get a list of all available channels from the Session
.
dg, err := discordgo.New("Bot " + Token)
if err != nil {
fmt.Println("error creating Discord session,", err)
return
}
// Open a websocket connection to Discord and begin listening.
err = dg.Open()
if err != nil {
fmt.Println("error opening connection,", err)
return
}
// Get all channel ID's from dg here
Is this even possible with the discord API?