If you want to contribute new code to the project, please follow the steps outlined below.
- Install the latest LTS release of Node.js and the latest version of Git.
- Fork & clone the repository, and make sure you're working on the main branch.
- Run
npm install
to install dependencies. - Write your code!
We use Standard to enforce a consistent coding style. You can run npm test
to lint your code before committing, or you can install a plugin for your editor of choiceto make things even more efficient. See the Resources section below for more information.
In most cases you probably want to test your new feature or bug fix on a Discord server before submitting a Pull Request. To do that:
- Visit the Discord Developer Dashboard and create a new application.
- Go to Settings → Bot and click Add Bot to create a bot user for your application.
- On the same page, copy your bot's token.
- Create a
.env
file in the root directory and add the following lines:
TOKEN=your bot token
GUILD=your server ID
- If you haven't already, create a new Discord server for testing and invite your bot to it.
- Run the bot with
npm run dev
.
If you're working on a feature that requires database access, you'll need to set up a local PostGreSQL server and add the URL to your .env
file:
DATABASE_URL=your database URL
When you're ready, submit a Pull Request and wait for your changes to be reviewed!