Skip to content

Discord BOT

M0dii edited this page May 1, 2021 · 2 revisions

Creating a Bot Account

In order for the plugin to work, you must first create a Discord Bot account. The creation process is really simple and straight-forward.

  1. Make sure have a Discord account and logged on to the Discord website.
  2. Go to the application page. https://discord.com/developers/applications
  3. Click on the “New Application” button.
  4. Give the application a name, this is how the BOT will be called and click “Create”.
  5. Create a Bot User by navigating to the “Bot” tab and clicking “Add Bot”.
    • Click “Yes, do it!” to continue.
  6. Make sure that Public Bot is ticked if you want others to invite your bot.
    • You should also make sure that Require OAuth2 Code Grant is unchecked unless you are developing a service that needs it. If you’re unsure, then leave it unchecked.
  7. Copy the token using the “Copy” button.
    • This is not the Client Secret at the General Information page.

It should be worth noting that this token is essentially your bot’s password. You should never share this to someone else. In doing so, someone can log in to your bot and do malicious things, such as leaving servers, ban all members inside a server, or pinging everyone maliciously. The possibilities are endless, so do not share this token.

If you accidentally leaked your token, click the “Regenerate” button as soon as possible. This revokes your old token and re-generates a new one. Now you need to use the new token to login.

And that’s it. You now have a bot account and will have to put the given token in the config.yml

Inviting Your Bot

So you’ve made a Bot User but it’s not actually in any server. If you want to invite your bot you must create an invite URL for it.

To invite the BOT to the server, follow the steps:

  1. Go to the “OAuth2” tab.
  2. Tick the “bot” checkbox under “scopes”.
  3. Tick the permissions required for your bot to function under “Bot Permissions”.
    • Please be aware of the consequences of requiring your bot to have the “Administrator” permission.
    • Bot owners must have 2FA enabled for certain actions and permissions when added in servers that have Server-Wide 2FA enabled. Check the discords 2FA support page for more information.
  4. Now the resulting URL can be used to add your bot to a server. Copy and paste the URL into your browser, choose a server to invite the bot to, and click “Authorize”.

The person adding the bot needs “Manage Server” permissions to do so.

Clone this wiki locally