Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Latest commit

 

History

History
62 lines (51 loc) · 2.41 KB

CONTRIBUTING.md

File metadata and controls

62 lines (51 loc) · 2.41 KB

Contribution Guidelines

To facilitate efficient development, it will be helpful to run your own bot on our test server. We have test versions of Notion and a MongoDB instance. To get setup, please follow these guidelines:

Create your own bot to use in your local dev environment

  1. Visit the Discord Developer Portal
  2. Sign in with your Discord credentials
  3. Create a new application, call it whatever you want
  4. On the left, select "Bot" and create a bot user
  5. Switch on "Presence Intent" and "Server Members Intent"
  6. Save your changes
  7. On the left, select "OAuth2"
  8. Under "Scopes", select "bot"
  9. Permissions. Enable only these permissions:
  • Manage Server
  • Manage Roles
  • Manage Channels
  • Kick Members
  • Ban Members
  • Manage Emojis
  • Manage Webhooks
  • View Channels
  • All of the permissions under "Text Permissions"
  • No permissions under "Voice Permissions"
  1. Select and copy the generated URL under "Scopes." Make sure the value of permissions in the URL reads 4027055222
  2. Send the URL via Discord DM to nonsense to have it added to the test Discord server

Clone the repo to local

  1. Create a new feature branch from the dev branch
  2. Copy the .env file and name it whatever you want; add it to your local .gitignore
  3. Request the test Notion token and MongoDB URI from one of the repo maintainers, copy your bot's token (found under the bot tab in the developer's portal) and replace the relevant values in your copied .env file, making sure to update the file name where it is required in app.js
  4. npm install
  5. Run your bot and test your connections

Develop!

Work on your features/assignments. Tests should be written for new features that are added. We are using Jest as the test library, so please familiarize yourself with Jest if you are not already familiar with it. If you need help with writing tests, please ask, as we have a couple devs on board who have experience in this area.

When you feel the feature is ready to be battle tested, lint and test your code and run it through Prettier prior to pushing it. Submitting a PR will trigger this workflow anyway. However, the less we have to do to fix merge conflicts and failed workflows, the better.

Once the branch is ready to be merged, push it to the repo and create a PR to the dev branch. From this point, it will follow the details set out in WORKFLOW.md.