Skip to content

Latest commit

 

History

History
149 lines (87 loc) · 3.83 KB

CONTRIBUTING.md

File metadata and controls

149 lines (87 loc) · 3.83 KB

Contributing

Fork the repository

  1. Go to the repository coderdojobraga/gongo.

  2. In the top-right corner of the page, click Fork.

Clone the forked repository

  1. Go to your fork of the repository

  2. Under the repository name, click Code.

  3. Copy the URL.

  4. Open a Terminal.

  5. Navigate to the location where you want the cloned directory.

  6. Run the command git clone with the URL you copied earlier. It will look like this:

    git clone https://github.com/<your-github-username>/gongo.git

Now, you have a local copy of your fork of the gongo repository.

Install python in the specified version

  1. We recommend using asdf as the version manager

    You can read the installation guide here.

    And then install the asdf-python plugin.

    asdf plugin-add python

    Note: You should set legacy_version_file to yes on the asdf config file (read more here)

Install the dependencies

On the project directory, run:

bin/setup

Get Discord bot token

  1. Go to the discord developer portal.

  2. In the top-right corner of the page, click New Application.

  3. Type the name for your bot, and click Create.

  4. In the left-hand panel click on Bot and then Add Bot.

  5. Now on the right of the profile picture, click on the option Click to Reveal Token to view the token ID.

Modify the .env file to contain your bot token.

This file was created when you ran bin/setup and is located on the project directory.

Set up a Discord server to test the bot

  1. Use this server template to clone the existing server.

  2. Invite the bot using a link like this:

    https://discord.com/api/oauth2/authorize?client_id=<id>&permissions=<permissions>&scope=bot

    Where <id> is your bot's client id found in the discord developer portal and <permissions> is the permissions integer that can be found on the bot's page, for now this value is set to 338757952 with the following permissions:

Create a branch to work on an issue or feature

On the project directory run the following command to create a new branch and switch to it:

git checkout -b <branch>

Where <branch> is the name of the new branch.

Push changes

  1. After working on the branch, commit your changes:

    git commit -m "Commit message"

    Recommendation: How to write a git commit message

  2. Push the changes to your git repository:

    git push -u <remote> <branch>

    Here <remote> is the current branch’s remote (typically origin).

Create pull request

  1. Go to your fork of the repository.

  2. Pick the branch you wish to have merged.

  3. Click on Pull request

  4. Enter a title and description for your pull request.