This is an implementation of a Discord bot using Go that I'm doing as a learning exercise and a hobby.
- Perform the handshake and connect to Discord Event Gateway
- Maintain connection sending heartbeats
- For now it is unable to reconnect if something fails
- Go:
v1.23 - Discord account
-
First step is to create a bot account and get a token to be able to authenticate the bot. Follow the discord.py tutorial
-
Setup the
.envfile by usingcp .env.example .envand inserting your discord token -
Setup the bot intents in
config/bot_intents_config.json. Watch out as some of these require extra privileges. Refer to the documentation: Gateway Intents -
Then run, from the root of the project,
go mod tidyandgo run ./cmd/main.go