Skip to content

Getting Started with Development

Colin edited this page Feb 26, 2020 · 1 revision

Getting Started With Development

Setting Up Your Environment

Some setup is required in order to start contributing to Horace.

Node JS

Horace is based on NodeJS, which is required to run it. If you haven't already, you'll need to go ahead and download it.

Installing Dependencies

Horace borrows functionality from multiple dependencies. You can go ahead and install these dependencies by running npm install in the root directory after installing NodeJS.

Discord API Usage

If you haven't already noticed, Horace is a Discord bot. If you haven't already, go ahead and visit the Discord Developers Section in order to create an application for developing bots. This will generate an API key for you to use. Connect this API key into the config.json file. This file is created by copying the content of the example file config.json.example into a new file named config.json*. (This will be further explained in a second.) This step is needed to connect the bot authentication to your instance of the bot.
Friendly reminder to keep API keys secret to you. Always remove them from your code, or add them to a .gitignore, before submitting your work.

To test Horace, you'll need to invite the bot to your development server. Copy and paste the following link, replacing XXXX with the client_id of your bot. The client ID can be found on the Developers Section. https://discordapp.com/oauth2/authorize?client_id=XXXX&scope=bot

Ready to test your modifications to Horace?

In your root directory, go ahead and run npm start, and you're ready to go.

We have a linter for NodeJS

We use eslinter for code checkups. To run the linter, go ahead and run npm run pretest.

Questions, Comments, Concerns

  • General questions about KOA or Horace? Head on over to the KOA Discord Server for any sort of discussion. If you're looking to discuss development or features, we'd recommend the #computer-science channel.
  • Development questions or code problems? Search up your question on Stack Overflow or find general forums if your questions are related specifically to code, but no harm in asking other #computer-science sectorians for discussions, or pinging someone from the KOA engineering team.
  • Check out the FAQ below!

Pull Request Guidelines

Please adhere to the following guidelines. We want to avoid duplicate issues, reports, features, etc.

  1. Search the Issue Tracker for any relevant threads to what you're looking to create a PR for.
  2. Keep it detailed. We want to know your vision, and the more you give us the better discussion we can have!
  3. Please make sure you have read the license agreement. We're using the MIT License- it's only 3 paragraphs!
  4. Make a new branch to fork your changes from
  5. Make sure to test your bot on a local/personal testing Discord server
  6. Make sure your branch is updated with the master branch before sending your pull request, in case other changes have been made
  7. Make sure that your new feature is properly tested, and that it can pass all tests before submitting the pull request.
  8. Send your pull request to the develop branch