Overview
FERAL’s Discord channel uses the Gateway API with WebSocket to receive messages in real time. The bot can respond to commands, mentions, and DMs across any server it’s invited to.Setup
Create a Discord Application
Go to the Discord Developer Portal and click New Application. Name it
FERAL.Create a Bot user
In the application settings, go to Bot and click Add Bot. Under the bot settings:
- Toggle Message Content Intent to ON (required to read message text)
- Toggle Server Members Intent to ON (optional, for member-aware features)
- Toggle Presence Intent to OFF (not needed)
Copy the bot token
Click Reset Token to generate a new token. Copy it immediately — Discord only shows it once.
Invite the bot to your server
Go to OAuth2 → URL Generator. Select scopes:
botapplications.commands
- Send Messages
- Read Message History
- Embed Links
- Attach Files
- Use Slash Commands
Configure channel restrictions (optional)
| Setting | Default | Description |
|---|---|---|
allowed_channel_ids | [] (all) | Restrict to specific text channels |
allowed_guild_ids | [] (all) | Restrict to specific servers |
respond_to_mentions_only | false | Only respond when @mentioned |
prefix | null | Command prefix (e.g., !feral status) |
Gateway Intents
FERAL requests these gateway intents when connecting:| Intent | Required | Purpose |
|---|---|---|
GUILDS | Yes | Track servers and channels |
GUILD_MESSAGES | Yes | Receive channel messages |
MESSAGE_CONTENT | Yes | Read message text (privileged) |
DIRECT_MESSAGES | Yes | Receive DMs |
GUILD_MEMBERS | No | Member-aware features |
If your bot is in more than 100 servers, Discord requires verification to use privileged intents. For personal use this is not an issue.
Message Handling
| Trigger | Behavior |
|---|---|
| DM to bot | Always responds |
@FERAL in channel | Responds with full context |
Prefix command (!feral ...) | Responds if prefix is configured |
| Any message in allowed channel | Responds if respond_to_mentions_only is false |
Slash Commands
FERAL automatically registers these slash commands when it connects:| Command | Description |
|---|---|
/feral ask <question> | Ask FERAL anything |
/feral status | Show brain and hardware status |
/feral briefing | Get your morning briefing |
/feral health | Latest health metrics |
Troubleshooting
Bot is online but doesn't respond
Bot is online but doesn't respond
Verify that Message Content Intent is enabled in the developer portal. Without it, the bot receives events but message content is empty.
Bot not appearing in server
Bot not appearing in server
Re-generate the OAuth2 invite URL with the correct scopes (
bot, applications.commands) and re-invite.Rate limited by Discord
Rate limited by Discord
FERAL includes automatic rate limit handling. If you see 429 errors in logs, reduce message frequency or restrict to fewer channels.
