How to set up a Discord application and server

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:

Create an application

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:

  1. Create a Discord Bot account by visiting this link on the Discord Developer Portal.

  2. Log in to your account.

  3. Click the “New Application” button present at the top-right corner of the portal.

  4. Add the name of the application and click the “Create” button.

Step 1: Create a Discord account
1 of 5

Connect the application with the project

To connect the application to the project, perform the following operations:

  1. Go to the My Applications section and click the created application.

  2. In the “General Information” tab, there will be “APPLICATION ID” and “PUBLIC KEY” provided.

  3. Copy both and place these in the “.env” file of the project.

Step 1: Click the created application
1 of 2

Set up a bot in the application

To add a bot to the created application, complete the following instructions:

  1. Click the “Bot” button in the left sidebar of the Discord portal.

  2. Click the “Reset Token” button and copy the created token. Also, change the username as per requirements.

Step 1: Click the Bot button
1 of 2

Create a Discord server

To create a Discord server, visit the Discord website and follow the below steps:

  1. Click the “Open Discord” button.

  2. Log in using the credentials created above.

  3. Click the “+” button present at the left sidebar.

  4. Click the “Create My Own” button present in the pop-up window.

  5. Skip the next window.

  6. Add the name of the server.

Step 1: Click the Open Discord button
1 of 6

Connect the Bot to already-created 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:

  1. Click the “OAuth2” → “Url Generator” button.

  2. Check the “bot” and “applications.commands” boxes given under the “SCOPES” tab.

  3. Check the “Administrator” box under the “BOT PERMISSIONS” tab.

  4. Copy the generated URL.

  5. Paste the URL in the browser.

  6. Select the server name.

  7. Click the “Authorise” button.

Step 1: Click the Url Generator button
1 of 5

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved