Creating the Discord Application - dkoz/palworld-palbot GitHub Wiki
This section covers the process of creating a Discord application, inviting the bot to your server, and enabling intents for proper functionality.
Creating a Discord Application
-
Open Discord Developer Portal: Go to the Discord Developer Portal and log in with your Discord account.
-
Create a New Application: Click on the
New Applicationbutton. Give your application a name and confirm by clickingCreate. -
Configure Application: In the application settings:
- General Information: Review and customize the application's name and description.
- Bot: Navigate to the
Bottab and you can set the bot's username and profile picture.
-
Copy the Bot Token
- In the Bot settings, find the
reset tokenunder theTokensection. Copy and paste this token into a text file for later.
- In the Bot settings, find the
Enabling Intents
- Enable Required Intents
In the bot settings under theBottab, you will find a section forPrivileged Gateway Intents. Enable all the intents:PRESENCE INTENT: Required for your bot to received presence updates.SERVER MEMBERS INTENT: For operations related to server members.MESSAGE CONTENT INTENT: If your bot needs to read message content.
Making Your Bot Private
-
Install Settings:
In theInstallationtab:- Set the
Install Linkdropdown toNone. - Uncheck
User InstallandGuild Installto prevent users from inviting your bot on discord.
- Set the
-
Bot Settings:
In theBottab:- Disable the
Public Botoption so that only you can invite your bot to a server.
- Disable the
Inviting the Bot to Your Server
-
Generate Invite Link: In the
OAuth2tab:- Under
Scopes, selectbot. - Under
Bot Permissions, select the permissions your bot needs.
- Under
-
Copy and Use the Invite Link
After selecting the appropriate scopes and permissions, an invite link will be generated at the bottom of the scopes section. Copy this link and open it in a web browser to invite your bot to your Discord server. -
Example Invite Link
client_id: Replace theYOUR_BOT_CLIENT_IDwith the application id of the bot.
https://discord.com/api/oauth2/authorize?client_id=YOUR_BOT_CLIENT_ID&permissions=8&scope=bot%20applications.commands