-
Go version >= 1.14
-
Postgres database
-
Set the environment variable
DATABASE_URLtopostgres://[user]:[password]@[hostname]:[port]/[dbname] -
Run
go getto install dependencies -
Set up Discord bot token
-
Give the bot permissions to
Send messagesandRead message history -
Set the environment variable
BOT_TOKENto the Discord bot token
The commands of this bot follow the format: catan! [command] [arguments]
| Command | Description |
|---|---|
| catan! adduser [username] | Add a user to the leaderboard |
| catan! addwin [username] | Add a win for the user |
| catan! record [username] [points] | Add points after a game for the user. This also updates the points per game column |
| catan! leaderboard | Display the leaderboard |
- Create a Postgres database for testing
- Set the environment variable
TEST_DATABASE_URLtopostgres://[user]:[password]@[hostname]:[port]/[dbname] - Run
go test
