This repository contains the Discord bot for the Shotbow Discord server.
The bot has been set up to run with Docker. This means that you can build the bot
from source and run it on your own Discord server. In order to build the image,
simply run docker build -t chatbot .
.
Once the docker image has been built, you can run it using
docker run -d --name chatbot --restart=always chatbot
.
Since the provided configuration file has been fully set up to work with Shotbow's Discord server, you might need to manually update it. For this, you can choose from a variety of options.
-
Update the
config/default.js
configuration file. This repository makes use of the config npm-package. -
Add a
config/production.js
configuration file. Thedocker build
-command sets theNODE_ENV
toproduction
. The config package will automatically overwrite any values defined inconfig/default.js
with those defined inconfig/production.js
. -
If you only want to set the token, you can simply pass it on in the
docker run
command:docker run -e TOKEN=<YOUR_TOKEN> -d --name chatbot --restart=always chatbot
. It will then be added to theprocess.env
-variables. If defined, any value for the token defined in the configuration files will be overwritten. -
If you don't want to modify the source code to add configuration files, you can also choose to mount the configuration file through the
-v
directive. It will then be placed in theconfig
-directory inside the image. To do this, usedocker run -v /path/to/your/production.js:/usr/src/app/config/production.js -d --name chatbot --restart=always chatbot
. Note that it is best to use theproduction.js
configuration file here, since it will only overwrite the values that you want to overwrite from the embeddedconfig/default.js
configuration file.