-
Go version >= 1.14
-
Postgres database
-
Set the environment variable
DATABASE_URL
topostgres://[user]:[password]@[hostname]:[port]/[dbname]
-
Run
go get
to install dependencies -
Set up Discord bot token
-
Give the bot permissions to
Send messages
andRead message history
-
Set the environment variable
BOT_TOKEN
to 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_URL
topostgres://[user]:[password]@[hostname]:[port]/[dbname]
- Run
go test