Creating a Discord Bot¶
Create the Application¶
- Go to the Discord Developer Portal and click New Application
- Give your bot a name (e.g. "Dexter") and a profile picture
- Click Create
Create the Bot User¶
- In your application, go to the Bot section
- Click Add Bot → Yes, do it!
- Click Reset Token to reveal your bot token — copy and save it securely
Keep your token secret
Never share your bot token or commit it to source control. Anyone with the token can control your bot.
Enable Required Intents¶
In the Bot section, enable these Privileged Gateway Intents:
- [x] Server Members Intent — required for role checking
- [x] Presence Intent — optional but recommended
- [x] Message Content Intent — required for legacy
!prefix commands
Invite the Bot to Your Server¶
- Go to the OAuth2 → URL Generator section
- Under Scopes, select
botandapplications.commands - Under Bot Permissions, select:
- Send Messages
- Manage Messages (for auto-delete)
- Embed Links
- Attach Files
- Read Message History
- Use External Emojis
- Manage Webhooks (if using webhook-based channel posting)
- Copy the generated URL and open it in your browser
- Select your server and click Authorize
Get Your IDs¶
Enable Developer Mode in Discord (Settings → Advanced → Developer Mode), then right-click to copy IDs:
- Guild ID — right-click your server name
- Channel ID — right-click the registration channel
- Your User ID — right-click your username
Configure Dexter¶
Add to your config/local.json:
{
"discord": {
"enabled": true,
"token": ["YOUR_BOT_TOKEN"],
"guilds": ["YOUR_GUILD_ID"],
"channels": ["REGISTRATION_CHANNEL_ID"],
"admins": ["YOUR_USER_ID"]
}
}
Test It¶
- Start Dexter
- Go to the registration channel and type
/start - You should receive a welcome DM from the bot
Quick Tracking Test¶
Use slash commands to test basic tracking:
/profile location set— set your location/pokemon pokemon:Pikachu— track Pikachu spawns/filters show— verify your filters
When done testing:
/filters remove type:pokemon— remove test filters