Describe what your bot does
You need to edit the following files:
-
.env-template
and copy as.env
-
package.json
- Specifically, define the "database_name" key. This name will be used to create two databases when you run the local db reset npm scripts:"dbname-dev" and "dbname-test". -
.circleci/config.yml
-
config/**
(all configurations).
git clone git@github.com:thanpolas/discord-bot-template.git
cd discord-bot-template
npm i
- Go to the developer portal: https://discord.com/developers/applications
- Create Application.
- Go to "Bot" Menu and add expected permissions.
- Go to "OAuth2" menu and select the "bot" scope.
- Copy the OAuth2 URL and paste it on the browser.
- Help on creating a bot: https://discordpy.readthedocs.io/en/latest/discord.html
- Copy
.env-template
to.env
and fill in the required values. - Update env variables on the project.
If you need database support, use the Docker and docker-compose, configurations so you will need to install the Docker Desktop package on your local machine.
Once that is done, enter the working directory and type:
docker-compose up -d
More on all docker-compose
available commands.
This project supports .env
file which is on .gitignore
for your convenience when developing on your local. Needed environment variables
can be found on .env-template
which you should copy to .env
and edit.
npm run db:reset:local
npm run knex:create_migration <name of migration>
npm run knex:migrate
Use the jest
command to run all tests or specific ones.
The tests will look for the NUKE_TEST_DB
environment variable to be set to
initiate the test database nuking and re-population, use it like so:
NUKE_TEST_DB=1 jest
When a new node version is available you need to updated it in the following:
/package.json
/.nvmrc
/.circleci/config.yml
/Dockerfile
TBD
Copyright © Thanos Polychronakis and Authors, Licensed under ISC.