Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 2.58 KB

CONTRIBUTING.md

File metadata and controls

46 lines (38 loc) · 2.58 KB

Contributing

Setting up the bot

  1. Create a new Discord bot in the developer portal
  2. Fork the repository
  3. Clone your fork to your computer
    1. If you'd like to get a tour of the codebase and a second pair of eyes during setup, snag a slot on the calendar
  4. Copy .env.example to .env
  5. Configure env variable
    1. From the General Information page:
      1. discord-general-settings
      2. Copy the Application ID as DISCORD_APP_ID
      3. Copy the Public Key as DISCORD_PUBLIC_KEY
    2. From the Bot page:
      1. discord-bot-settings
      2. Reset the bot's token and paste the new one as DISCORD_HASH
      3. discord-token
    3. (optional) Request access token for Amplitude metrics from vcarl#7694 and paste the token as AMPLITUDE_KEY
    4. (optional) Go to your Github Settings and create a personal access token with the scope "gist", and paste the
  6. From the Bot page: 3 settings off, 2 settings on
    1. Public Bot off
    2. Requires OAuth2 Code Grant off
    3. Presence Intent off
    4. Server Members Intent on
    5. Message Content Intent on
  7. npm install
  8. npm run dev
  9. Look for the following message in the logs, and open the URL in a browser where you're logged into Discord.
    • Bot started. If necessary, add it to your test server:
    • Make sure to not install this bot directly on Reactiflux but on the Reactiflux Test Server. Ask for the correct role in RF's #reactibot channel

Implementation notes

There are subtle issues when making some chaings. These are notes for steps to take to make sure it's done correctly when needed.

Generating images for #resume-review requires GraphicsMagick installed. Brew, Linux

Environment variables

Adding a new environment variable needs to be done in several places to work corectly and be predictable for new developers:

  • Add a suitable example to .env.example
  • Add to your own .env (and restart the dev server)
  • Add to the action in .github/workflows/node.js.yml
  • Add to the Kubernetes config under `cluster/deployment.yml