Discord is a communication platform that allows users to create and join servers for text, voice, and video chat. A Discord application refers to software built on the Discord platform, often bots or custom integrations, to enhance functionality and user experience within Discord servers. Please follow the instructions below to set up discord applications for customized projects:
To work with Discord, we first need to create a Discord application. To do that, head over to the Discord Developer Portal and follow the instructions mentioned below:
Create a Discord Bot account by visiting this link on the Discord Developer Portal.
Log in to your account.
Click the “New Application” button present at the top-right corner of the portal.
Add the name of the application and click the “Create” button.
To connect the application to the project, perform the following operations:
Go to the My Applications section and click the created application.
In the “General Information” tab, there will be “APPLICATION ID” and “PUBLIC KEY” provided.
Copy both and place these in the “.env” file of the project.
To add a bot to the created application, complete the following instructions:
Click the “Bot” button in the left sidebar of the Discord portal.
Click the “Reset Token” button and copy the created token. Also, change the username as per requirements.
To create a Discord server, visit the Discord website and follow the below steps:
Click the “Open Discord” button.
Log in using the credentials created above.
Click the “+” button present at the left sidebar.
Click the “Create My Own” button present in the pop-up window.
Skip the next window.
Add the name of the server.
We’ll need to connect the Bot to the Discord server to use it in our application. To do so, head over to the Discord Developers Portal and follow the below steps:
Click the “OAuth2” → “Url Generator” button.
Check the “bot” and “applications.commands” boxes given under the “SCOPES” tab.
Check the “Administrator” box under the “BOT PERMISSIONS” tab.
Copy the generated URL.
Paste the URL in the browser.
Select the server name.
Click the “Authorise” button.
Free Resources