Skip to content

Discord token

Joel edited this page May 9, 2018 · 21 revisions

< Back to "Getting Started"


Want a quick guide?
Discord token Quick Guide


Introduction

This is a guide to create a new Discord bot, setting it up and using its token in the Prodosia application.

There are several parts to incorporating Discord integration in the Prodosia application:

  • Create a Discord Bot Account.
  • Adding said Bot Account to a discord guild.
    Note: This step requires you to have administrative or owner privileges in the Discord guild.
  • Inserting the Discord token in the Prodosia application.

https://discordapp.com/developers/applications/me

Creating the Discord Bot

  1. After going to the specified url at the top, login to Discord and choose to create a "New App".
  2. Here you choose a name, description and app icon. It is not necessary to add a redirect uri (and as such, it is advised against).
  3. Choose to "Create App" where the website will transition to an overview of the account.
  4. For purposes of managing the Prodosia application, a Bot User should be used. Go to the Bot tab and choose to Create a Bot User. This will permanently transition your app into a bot user.
    Create Bot User
  5. Once this choice has been selected, the Bot tab will reveal a Username and allow for the user to "click to reveal" the bot token. Click this and store the bot token somewhere.
    Discord Bot Token
    Eventually the token will have to be added to the Prodosia application.
    API credentials

Note:
Keep this token safe. The token will be stored in the keys.txt file in the same folder as the application.

Adding the bot to a server

In order to use this bot account, it will need to be added to a Discord guild.

Using the following url:

https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID_GOES_HERE&scope=bot&permissions=101376

Replace CLIENT_ID_GOES_HERE with the Client ID (not token) of the bot. The Client ID can be found at the very top of the bot overview page, under the tab "App Details". Web link example

Open above modified url in a web browser. The browser should prompt which server to add the bot to.
If the bot needs to be added by someone else (e.g. because you are lacking admin credentials), enable the Public Bot checkbox under the "Bot" tab and provide them with above modified link.

Optional:

If it is necessary to use custom permissions, these can be calculated at:
https://discordapi.com/permissions.html
The recommended permission scope is 101376 which allows for:

  • Reading messages sent in discord (necessary for responding to Tracker commands)
  • Embedding links (optional for archives)
  • Reading message history (duplication prevention for archives)
  • Sending messages (responding to Trackers and posting archives)
  • Sending files through discord (necessary for the Getlist Command)

Notes:

The Discord bot will only function for the channels that it has access to.

Clone this wiki locally