Skip to content

Adding Bot to a IIIT Club Server

Kunwar Shaanjeet Singh Grover edited this page Jun 15, 2021 · 13 revisions

Adding the bot

  1. Make a pull request to the server by ediing the bot/server_config.ini file as per your server requirements. (configurations are detailed below)

  2. Create a new role for the bot, which satisfies the criterions as given in the next section.

  3. After your PR is merged, navigate to the this URL to invite the bot and add it to your server. Note that you must have "Manage Server" permission on this server. (If you're new to Discord roles, read the FAQ: link)

Notes

  1. .verify might not work for server-admins. That indicates your role setup does not follow the criterions below.

If at any point you face any difficulty, please raise a new issue in this GitHub repository.

Regarding the bot role

You can create a new "Bot" role in your server, and give it to our bot. This role should satisfy the following criterions:

  1. The bot will only be able to give the user the role A if the bot's topmost role is above role A.
  2. To change nickname for a user, the user's highest role should be lower than the bot's highest role.
  3. The bot should have read access to the channel to read .verify commands
  4. The bot should have write access to the channel to give feedback on verification (Success/Failure).

(If you're new to Discord roles, read the FAQ: link)

Configuration parameters

The following configuration are possible through bot/server_config.ini:

  1. setrealname: set member nickname (post verification) equal to their real name (obtained from CAS).
  2. grantroles: a comma-separated list of roles you'd like to assign to the member post-verification. If the roles do not exist in the server, they'll be created automatically.
  3. serverid: ID of the Discord server. See Discord FAQ. (In Discord lingo, a server is known as a guild.)
  4. deleteroles: a comma-separated list of roles you'd like to remove from the member post-verification. For example, if new users get the unverified role on joining your server, you can set deleteroles=unverified.

deleteroles, setrealname are optional. If you don't specify a value for them, it's picked up from the [DEFAULT] section at the top.

Example usage:

[Chess Club]
serverid=724827932778037370
setrealname=yes
grantroles=Verified,IIIT

Clone this wiki locally