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.ymlfile, create a.env.productionfile using theKEY=VALUEstructureKey Value Required? BOT_TOKEN Your Discord bot token. Required. PET_API https://thecatapi.com or https://thedogapi.com key. Required for /pictures cator/pictures dog, otherwise optional.GUILD_ID Server ID. Optional for production, required for development. - On a command prompt/terminal window,
cdto the folder containing thedocker-compose.ymlfile. - Type
docker-compose up -dand 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.productionfile on the folder containing the cloned repository. See step 3 of quickstart. -
Open a command prompt/terminal window,
cdto the folder containing the cloned repository, and executenpm i. -
Once
npm iis finished, runnpm start. The bot will now run.
- Follow step 1 and 2 of standalone production.
- Create a
.env.developmentfile on the folder containing the clone repository. See step 3 of quickstart. - Open a command prompt/terminal window,
cdto the folder containing the cloned repository, and executenpm i. - Once
npm iis 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.