A Discord bot written in TypeScript that may or may not have a reason to exist ¯\_(ツ)_/¯
- Install Docker Engine and Docker Compose.
- For macOS and Windows, install Docker Desktop. This includes both Docker Engine and Docker Compose.
- For Linux, follow these instructions:
- Download the docker-compose.yml file from this repo.
- On the folder containing the
docker-compose.yml
file, create a.env.production
file using theKEY=VALUE
structureKey Value Required? BOT_TOKEN Your Discord bot token. Required. PET_API https://thecatapi.com or https://thedogapi.com key. Required for /pictures cat
or/pictures dog
, otherwise optional.GUILD_ID Server ID. Optional for production, required for development. - On a command prompt/terminal window,
cd
to the folder containing thedocker-compose.yml
file. - Type
docker-compose up -d
and press Enter, Docker Compose will download the required files and run the bot for you.
Note: The docker-compose.yml
file also includes the watchtower container for auto-updating. If you wish to manually update the bot, you can run docker-compose pull
then docker-compose up -d
.
-
Install Node.js.
Note: You also need the
npm
(Node Package Manager). -
Clone this repository.
-
Create a
.env.production
file on the folder containing the cloned repository. See step 3 of quickstart. -
Open a command prompt/terminal window,
cd
to the folder containing the cloned repository, and executenpm i
. -
Once
npm i
is finished, runnpm start
. The bot will now run.
- Follow step 1 and 2 of standalone production.
- Create a
.env.development
file on the folder containing the clone repository. See step 3 of quickstart. - Open a command prompt/terminal window,
cd
to the folder containing the cloned repository, and executenpm i
. - Once
npm i
is finished, runnpm run dev
. The bot will now run.
Note: With npm run dev
, nodemon
will track file changes and restart the bot once a file is changed.