Basically going through the discord.js Guide and then adding a bunch of other stuff.
- Clone this repo.
- Create a file called
.env
at the root of the repo. This needs to be filled in with enviornment variables.token= clientId= guildId=
One-time setup steps:
- Install nvm
- Tell nvm to use the correct version of node:
nvm use
- Install the TypeScript compiler globally:
npm install -g tsc
- Install yarn:
corepack enable yarn install
Build and run with:
yarn build-and-run
One-time setup steps:
- Install Docker
Build the image with:
docker build -t mydiscordbot .
Run the image with:
docker run --env-file=".env" --volume ./logs:/app/logs -d --rm mydiscordbot:latest