Requirements: Yarn, Node (v16) OR Docker, Docker Compose
This project uses zero-install yarn, meaning you do not have to run a separate install step. All the dependancies are already there.
-
Clone this repository.
-
Create your environment by copying the .env.default file to
.env
and add your token and configuraton$ cp .env.default .env
-
Add ide helpers to your workspace:
$ yarn dlx @yarnpkg/sdks vscode
-
Build the bot using this command:
$ yarn build
-
You're done! You can run the bot with
$ yarn start
If you choose to use docker to run the bot, you can use the following commands:
$ docker-compose up --build
or if you dont want to use docker-compose:
$ docker build . --tag marty-bot:latest
$ docker run marty-bot:latest
There are some commands to help you develop the bot:
-
To rebuild the bot every time you save a file:
$ yarn watch
-
To start the development server, and restart it every time you save a file:
$ yarn dev
In order for the slash commands to work, they need to be registered before
the bot can process them. This is done automatically when the AUTO_REGISTER
environment
variable is set to true
.
If you're having trouble with vscode not showing types correctly, switch the typescript
version to the one located in the .yarn/sdks/typescript/lib
folder