A discord bot written to assist with Potential Central's ToughLove program.
- Accept Applications for ToughLove
TBD
- Node.js 16.9.0 or newer
- Redis
- A discord bot token
- Visit https://discord.com/developers and create a 'New Application'
- Add A 'Bot' to this application from the 'Settings' menu on the left.
- Copy/save the token from this page.
- From the 'Settings' menu click on Oauth2 -> URL Generator.
- In the 'Scopes' section select 'bot' and 'applications.commands'
- In the 'Bot Permissions' section select all 'Text Permissions'
- Copy the 'Generated URL' at the bottom and visit that URL to invite the bot to your server.
The bot requires the following environment variables set
DISCORD_TOKEN
- The Discord bot application token obtained in the Discord Bot Setup
section.
GUILD_ID
- The ID of your server (https://discord.com/channels//XXXX)
ROLE_ID
- The ID of the Role which has access to 'admin' commands
BUGSNAG_API_KEY
(optional) - API Key for Bugsnag error tracking
-
Create a
.env
file (env.sample provided) and make sure the above environment variables are set. -
Run
docker-compose up
to build the containers.
- Run
docker-compose run bot node deploy_commands.js
once to Register the application commands with discord
To build and run the bot in a development environment:
- Clone the code and run
npm install
to fetch dependencies. - Create a
.env
file and set it up with the above config entries. - Run
node index.js
to start the bot. - Run
node deploy_commands.js
to register Application Commands with discord