How to Contribute

Contribute to RPANBot.

👉 Make sure to read the Code of Conduct.

Contribute to RPANBot

👉 The RPANBot code lives in the RPANBot repository

Requirements

For a pull-request to be merged, your pull request must fullfill the following:

  • Your code must be formatted with our linters (make sure you have pre-commit installed, then run pre-commit install and pre-commit run --all-files).
  • Your pull request must target the staging branch.
  • It is strongly recommended test your code locally to avoid causing yourself (and others) a severe headache. If you did not test your code, you must specify it in your pull request.
  • You must fully document the changes of which you are making.

Assuming your code is compliant with the above, the pull request will need to be reviewed by 1 contributor. The contributors will review your code and highlight any changes they suggest be made.

Setting up a development environment

  • Make sure you have Docker and docker-compose installed and working locally.

  • Create an application on Discord's developer portal, go to the Bot tab, and copy the token and store it in a safe place.

  • Create an application on Reddit's website and copy the client ID and client secret, and store those in a safe place.

  • If you want error tracking, you can create a project at Sentry, however, this is optional.

  • Make a copy of .env.example and rename it to .env

    • Set DISCORD_TOKEN to the token from the Discord developer portal.
    • Set REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRET to the client ID and client secret (respectively) of the Reddit app you created earlier.
    • If you are using Sentry, set BOT/BN_WATCHER_SENTRY_DSN to the DSN for the Sentry project.
  • Start the bot by running docker-compose up from the main directory. This will initialize and start all of the services.

  • Run database migrations by running docker-compose exec api poetry run alembic upgrade head, which will set up the database tables.

Edit this page on GitHub