Clone
4
Discord Application
Corban-Lee Jones edited this page 2024-09-20 09:54:22 +00:00

Discord Application

This wiki covers how to create and prepare the Discord Application through the Discord Developers Portal.

Create Your Application

Navigate to the Discord Developers Portal and select the "New Application" button.

When prompted, enter a name for your application, accept the Developer Terms of Service and Developers Policy by checking the box, then press the "Create" button.

If successful, you will be automatically navigated to your newly created Discord Application.

Prepare Your Application for Production

The rest of this section will follow in the order of each relevant tab, using the navigation menu on the left hand side.

General Information

You should take note of the Application ID as it is required for the project environment variables, which are explained in the Environment Variables Wiki.

You can set a name, description and image if you please, but this is not required.

Installation

Ensure your Installation Context choices are in this format:

  • User Install
  • Guild Install

Take note of the Install Link URL, as it's required for the project environment variables, which are explained in the Environment Variables Wiki.

Navigate to the Default Installation Settings fields, where you will need to specify the scopes and permissions that the Discord Application will request when joining a Discord Server.

It will require the following scopes:

  • application.commands
  • bot

And the following permissions for the PYRSS-BOT bot to function:

  • Embed Links
  • Send Messages
  • Use Slash Commands
  • View Channels

Press the "Save" button to keep your changes!

OAuth2

Take note of the following fields, as they are required for the project environment variables, which are explained in the Environment Variables Wiki.

  • Client ID
  • Client Secret

Navigate to the Redirects section and add a new value. You will need to format this value using your endpoint for accessing the PYRSS web interface, if you only intend to access this locally then you could use something like http://localhost:8000/oauth2/login/redirect, otherwise you will need a publicly accessible endpoint like https://mydomain.com/oauth2/login/redirect. Keep track of whether you require http:// or https://. Keep your specified value for the project environment variables, which are explained in the Environment Variables Wiki.

Finally, navigate to the OAuth2 URL Generator section, which will produce the last environment variable needed from this page. You will need to check several scopes, select your redirect URL from the select box, then copy the generated URL.

The scopes required are:

  • identify (for the webui authentication to identify you)
  • guilds (for the webui to see your servers) -guild.members.read (for the webui to read your member profile on any given server)