-
Notifications
You must be signed in to change notification settings - Fork 3
Discord token
Want a quick guide?
Discord token Quick Guide
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
- After going to the specified url at the top, login to Discord and choose to create a "New App".
- 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).
- Choose to "Create App" where the website will transition to an overview of the account.
- For purposes of managing the Prodosia application, a
Bot Usershould be used. Go to theBottab and choose toCreate a Bot User. This will permanently transition your app into a bot user.
- Once this choice has been selected, the
Bottab will reveal a Username and allow for the user to "click to reveal" the bot token. Click this and store the bot token somewhere.
Eventually the token will have to be added to the Prodosia application.
Note:
Keep this token safe. The token will be stored in the keys.txt file in the same folder as the application.
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".
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.
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)
The Discord bot will only function for the channels that it has access to.

