** Set up your Discord bot ** Go to Developer Portal/application 1 - Click on "New Application" and give your bot a name.
GENERAL SECTION
- Set the following:
- Name: Choose a name for your bot.
- Description: Provide a short description of your bot.
- Icon: Upload an icon for your bot (optional).
BOT SECTION
- Navigate to the "Bot" tab and:
- Click "Add Bot" to create a bot user.
- Copy the Token (you will need this to run your bot).
- Enable the following settings:
- Privileged Gateway Intents (if needed):
- Presence Intent
- Server Members Intent
- Message Content Intent (if your bot requires it).
- Privileged Gateway Intents (if needed):
INSTALLATION SECTION
- Navigate to the "OAuth2" tab and:
- Go to the "URL Generator" section.
- Select the following scopes:
botapplications.commands
- Under "Bot Permissions," select the permissions your bot needs (e.g.,
Send Messages,Manage Roles, etc.). - Copy the generated URL and use it to invite your bot to your server.
RUNNING YOUR BOT
- Make sure you have the following installed:
- Node.js (if using JavaScript/TypeScript).
- Any required dependencies (e.g.,
discord.jsfor JavaScript).
- Use the bot token to authenticate and run your bot.
TIPS
- Always keep your bot token private. Do not share it or commit it to version control.
- Regularly update your bot to ensure compatibility with Discord API changes.