This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 70
Get bot token and add it to a server
Anders Øen Fylling edited this page Aug 7, 2021
·
7 revisions
To get your bot up and running you must create a Discord application and retrieve your Client ID and Token. This tutorial will guide you through the mentioned Discord process.
6. Now you can click "Copy" which will add the bot token to your clip board (which means you can hit Ctrl+v to paste it somewhere) or click "Reveal token" to manually copy it
func main() {
client := disgord.New(disgord.Config{
BotToken: "NjMwNTc0ODM5NTU5ODgwNzI1.XZqVmg.BxkYm3Rr1If02-n9kJL6svAHTyA", // <= paste token here
})
// connect, and stay connected until a system interrupt takes place
defer client.Gateway().Connect()
inviteURL, err := client.CreateBotURL()
if err != nil {
panic(err)
}
fmt.Println(inviteURL)
setupBot(client)
}