Discord
Setup
- Go to the Discord Developer Portal and create a New Application. Give it a unique name.
- In the sidebar, select Installation and set the Default Install Link to None.
- Go to the Bot tab:
- Untoggle Public Bot (so only you can invite it).
- Under Privileged Gateway Intents, enable Presence Intent, Server Members Intent, and Message Content Intent.
- Click Reset Token, confirm, and copy your token immediately. Save this token securely as you won’t be able to see it again!
- Go to OAuth2 → URL Generator:
- Select the
botscope. - Under Bot Permissions, check
Send MessagesandRead Message History.
- Select the
- Copy the generated URL at the bottom and paste it into your browser to invite the bot to your server.
Configuration
Add the bot token to ~/.kyber/.env:
KYBER_CHANNELS__DISCORD__TOKEN=YOUR_BOT_TOKENThen enable and configure in ~/.kyber/config.json:
{
"channels": {
"discord": {
"enabled": true,
"allowFrom": ["YOUR_USER_ID"],
"allowGuilds": [],
"allowChannels": [],
"requireMentionInGuilds": true,
"maxAttachmentMb": 20,
"typingIndicator": true
}
}
}Fields
| Field | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Enable the Discord channel |
allowFrom | array | [] | User IDs or usernames allowed to interact |
allowGuilds | array | [] | Server (guild) IDs allowed |
allowChannels | array | [] | Channel IDs allowed |
requireMentionInGuilds | bool | true | Only respond in servers when @mentioned or replied to |
maxAttachmentMb | number | 20 | Max attachment size to download (MB) |
typingIndicator | bool | true | Show “typing…” while processing |
The bot token is stored in ~/.kyber/.env, not in config.json.
Finding Guild, User, and Channel IDs
To configure your bot’s allowed lists, you will need the IDs for your server (guild), users, and channels.
-
Enable Developer Mode:
- Go to User Settings (cog icon) → Advanced.
- Toggle Developer Mode to ON.
-
Copy ID:
- User ID: Right-click on a user’s avatar or name and select Copy User ID.
- Server (Guild) ID: Right-click on the server icon in the left sidebar and select Copy Server ID.
- Channel ID: Right-click on a channel name in the server list and select Copy Channel ID.
Guild behavior
With requireMentionInGuilds: true (default), the bot only responds in servers when you @mention it or reply to one of its messages. In DMs, it always responds.
Set to false if you want the bot to respond to every message in allowed channels.