A bot for tracking speedrun.com world records in your discord server.
The following subject has not been tested and is subject to serious misinformation, but I tried my best.
All of these require:
- A discord bot account to log into, including the Token and Client ID (ID of the account).
- An administrator (most likely yourself)'s discord account ID.
- A guild to designate as the "admin guild", where you can do special adminning.
After getting the bot running, you should probably run the /admin update_commands command in the admin guild to register the commands globally.
- Install Docker / Docker Desktop.
- Create a
.envfile in the root directory - reference the.env.examplefile. docker-compose upto start it up.
You can view the database via phpmyadmin on that machine by going to localhost:8081.
- Install the AWS CLI.
- Log into your AWS account with
aws configure. - Run the following command:
aws cloudformation deploy
--template-file cloudformation.yml
--stack-name <StackNameHere>
--parameter-overrides
IP=<public IP of your network>
DiscordToken=<token>
DiscordClient=<ID>
DiscordAdmin=<ID>
DiscordAdminGuild=<ID>
DBPass=<password>
DBSnapshot=<optionally, a snapshot to create the DB from>
which will deploy a CloudFormation stack to the aws stack containing the bot and the RDS instance.
Note the IP parameter is currently required, but will become optional soon. This allows your machine to log into the RDS instance via mysql for debugging.
- Install Node.
- Install Docker / Docker Desktop.
npm install -Dto install dependencies.- Create a
.envfile in the root directory - reference the.env.examplefile. docker-compose -f docker-compose.dev.yml upto run the bot / phpmyadmin.npm run devto run the bot on the local machine. Be sure to specify "DBHost" as localhost.