Skip to main content

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

1

Create a Discord Application

Go to the Discord Developer Portal and click New Application. Name it FERAL.
2

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)
The Message Content Intent is required. Without it, FERAL receives empty message bodies for non-mention messages.
3

Copy the bot token

Click Reset Token to generate a new token. Copy it immediately — Discord only shows it once.
4

Invite the bot to your server

Go to OAuth2 → URL Generator. Select scopes:
  • bot
  • applications.commands
Select bot permissions:
  • Send Messages
  • Read Message History
  • Embed Links
  • Attach Files
  • Use Slash Commands
Copy the generated URL and open it in your browser to invite the bot.
5

Set the bot token in FERAL

6

Configure channel restrictions (optional)

Earlier versions of this page documented allowed_channel_ids, allowed_guild_ids, respond_to_mentions_only and prefix as options here. The brain reads none of those keys. Access control for every channel lives in the shared keys below, and the defaults are fail-closed: with no allowlist and no open pairing window, the channel accepts nothing. The old table described [] as “(all)”, which is the opposite of what the code does (channels/base.py:345-362).
A sender that is not allowlisted is recorded and receives no reply at all, so a stranger cannot learn whether a brain is listening (channels/base.py:345-362).
7

Restart and test

In any allowed Discord channel:

Gateway Intents

FERAL requests these gateway intents when connecting:
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

FERAL formats responses using Discord embeds for rich output — charts, health summaries, and SDUI cards are rendered as embedded messages.

Slash Commands

Earlier versions of this page listed /feral ask, /feral status, /feral briefing and /feral health as slash commands FERAL “automatically registers when it connects”. It registers none. There is no application-command registration anywhere in the brain, and the Discord gateway handler processes only MESSAGE_CREATE (channels/base.py:1150).
Talk to the bot with ordinary messages. Anything an allowlisted sender writes is forwarded to the brain as a normal turn, so there is no command vocabulary to learn — ask for status or a briefing in plain language.

Troubleshooting

Verify that Message Content Intent is enabled in the developer portal. Without it, the bot receives events but message content is empty.
Re-generate the OAuth2 invite URL with the correct scopes (bot, applications.commands) and re-invite.
FERAL includes automatic rate limit handling. If you see 429 errors in logs, reduce message frequency or restrict to fewer channels.