Custom Discord bot

This custom discord-python bot assigns roles to members joined at discord server. It looks and compares a list before verifying the roles. Helps to forming naming convention and simplify the registration process, deployed via heroku.

Setting up the bot

  1. Clone this repo

    $ git clone
    $ cd Tinky-discord-bot
  2. Create virtual environment (optional)

$ python3 -m pip install --user virtualenv
$ python3 -m venv myBotEnv
$ source myBotEnv/bin/activate
  1. Install libraries

$ pip install -r requirements.txt
  1. Setup the config variables

  2. Set up system variables (recommended)

Create a file `.env` and add tokens. Replace `' ... '` with
relevant info.
SERVER_ID='the id of server'
SERVER_NAME='name of server'
BOT_TOKEN='token of your bot'
DATABASE_URL='cloud database url'
  1. Update file (not recommended)

Update []( to the following
SERVER_ID=int('the id of server')
SERVER_NAME=str('name of server')
BOT_TOKEN=str('token of your bot')
DATABASE_URL=str('cloud database url')

Config variables can be fetched from your deployment environment. To obtain bot config, visit developers portal

  1. Update and suite the DataBase constraints by modifying where necessary.

Take care to modify the code to suite your roles and constraints. currently the bot will send a message to all un-verified members to start registration.

  1. Run you bot

$ python3


View Github