This repo contains a simple Bot for Discord in Go, with a basic code organization. We use:
- KuteGo API: an API that retrieve Gophers (thanks Gaelle :-)
- DiscordGo: a Client that interact with Go servers
Please read the Learning Go by examples: part 4 - Create a Bot for Discord in Go article in order to know more about this Git repository.
Install Go in 1.16 version minimum.
or:
$ go build -o bin/go-gopher-cli main.go
or
$ task build
First, you can export the token:
$ export BOT_TOKEN=<your bot token>
Let's run locally our Bot right now:
$ ./bin/gopher-bot-discord -t $BOT_TOKEN
Bot is now running. Press CTRL-C to exit.
or
$ task bot
$ task bot
task: [bot] ./bin/gopher-bot-discord -t $BOT_TOKEN
Bot is now running. Press CTRL-C to exit.
Now you can tape !gopher
, !gophers
and !random
in the Discord server connected to the Bot ;-).