๐ฎ Discord Quickstart
Create a Discord bot and add it to your server in 5 minutes.
โก Quick Setup (5 minutes)
Step 1: Create Discord Application
- Go to Discord Developer Portal
- Click "New Application"
- Name it (e.g., "My Assistant")
- Click Create
Step 2: Create Bot User
- Click "Bot" in the left sidebar
- Click "Add Bot" โ "Yes, do it!"
- Under Token, click "Reset Token"
- Copy the token (you'll only see it once!)
Step 3: Enable Required Intents โ ๏ธ
Still on the Bot page, scroll down to "Privileged Gateway Intents":
โ Enable these:
- MESSAGE CONTENT INTENT (required!)
- SERVER MEMBERS INTENT (recommended)
Click Save Changes.
Step 4: Add Token to Infinibot
Option A: Environment variable
export DISCORD_BOT_TOKEN="your-token-here"
Option B: Config file (~/.infinibot/config.json)
{
"channels": {
"discord": {
"enabled": true,
"token": "your-token-here"
}
}
}
Step 5: Generate Invite Link
- Go to OAuth2 โ URL Generator
- Under Scopes, check:
-
bot -
applications.commands
-
- Under Bot Permissions, check:
- Send Messages
- Read Message History
- Add Reactions
- Use Slash Commands
- Copy the generated URL at the bottom
Step 6: Invite Bot to Server
- Paste the URL in your browser
- Select your server
- Click Authorize
Step 7: Start Infinibot
infinibot gateway restart
Step 8: Message Your Bot! โ
DM the bot or @mention it in a channel.
๐ Quick Reference: Bot Permissions
Minimum permissions for basic chat:
Send Messages
Read Message History
Add Reactions
Use Slash Commands
Full permissions number: 274877975552
Pre-built invite URL (replace CLIENT_ID):
https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID&permissions=274877975552&scope=bot%20applications.commands
๐ Server (Guild) Setup
Control bot behavior per server:
{
"channels": {
"discord": {
"guilds": {
"YOUR_GUILD_ID": {
"channels": {
"general": { "requireMention": true },
"bot-chat": { "requireMention": false }
}
}
}
}
}
}
Find Guild ID:
- Enable Developer Mode: User Settings โ App Settings โ Advanced โ Developer Mode
- Right-click server name โ Copy Server ID
๐ Security: Who Can DM?
Pairing mode (default):
infinibot pairing list discord
infinibot pairing approve discord <code>
Allowlist mode:
{
"channels": {
"discord": {
"dm": {
"policy": "allowlist",
"allowFrom": ["user:123456789"]
}
}
}
}
โ Verify Connection
# Check status
infinibot status
# Send a test message
infinibot message send --channel discord --target "user:123456789" --message "Hello!"
๐ ๏ธ Troubleshooting
Bot is online but doesn't respond
Most common cause: Message Content Intent not enabled!
Fix:
- Discord Developer Portal โ Your App โ Bot
- Enable MESSAGE CONTENT INTENT
- Save and restart gateway
"Used disallowed intents" error
Same fix - enable the intents in Developer Portal.
Bot can't see messages in server
- Check bot has "Read Message History" permission in that channel
- Check channel permission overrides
Can't find the token
Tokens can only be viewed once. Reset it:
- Developer Portal โ Bot โ Reset Token
- Update your config with new token
"Invalid token" error
Token was reset or copied incorrectly. Get a fresh token from Developer Portal.
๐ Full Documentation
For slash commands, reactions, threads, and more: