Discord channel
Discord is the second workplace channel, beside Telegram and Slack. Like Slack it is workspace-shaped: one bot added to a guild serves every member, DMs are each person’s own session, and a shared channel answers only on a mention under a read-only per-channel account.
Shipped in v0.14.0. The contract text is
docs/contract/rbac.md(workplace channels section).
[discord]enabled = truebot_token_secret = "discord.bot" # secret-store name of the bot tokenguilds = ["1234567890"] # guilds allowed to talk to this daemonauto_provision = false # create a user for an unknown senderThe connection is the gateway WebSocket: Hello, heartbeat, Identify, Ready (the session id and resume URL are cached), and Resume after a drop, so a reconnect does not miss events and Identify’s global 1000-per-day cap is not burned. No public inbound endpoint is needed.
The bot requests the minimum intent set that can read a message and a mention: guilds, guild messages, direct messages, and MESSAGE_CONTENT. That last one is a privileged intent: enable it for the bot in the Discord developer portal before the daemon can read member messages.
Who a message is from
Section titled “Who a message is from”- A DM is the person’s own private session (source
discord:dm:<user>); a guild DM maps per user (discord:<guild>:<user>): their memory, workspace, toolset, quota and audit stamp. - A guild channel answers only on an
@mention, and the turn runs as a per-channel account (discord-<guild>-<channel>) holdingchannels.shared_channel_role: its own partition, no personal memory, notes or grants. The defaultchannelrole is read-only and grants nothing. - The guild allowlist gates everything: an unknown guild is ignored with one
discord.unauthorized_workspaceaudit row. auto_provision = truecreates a user (named after the Discord handle, rolechannels.default_role, defaultmember) for an unknown sender in an allowed guild; the default refuses them.
Replies go to the channel the message came from, threaded for guild mentions. Outbound sends share the rate limiter with Slack: Discord’s Retry-After and X-RateLimit-Reset headers set when the next call may go out.
Approval cards
Section titled “Approval cards”An ask renders as a message with Allow / Deny buttons and its expiry. The decision is authorized server-side: the person the turn belongs to decides when it is in their self-scope, an escalation card goes to the admins, and a click by anyone else is refused with an audit row. See approvals.
Files and provenance
Section titled “Files and provenance”Files work in both directions, like on Slack. Before a reply is posted to a guild channel, its provenance is re-checked against the channel account’s groups, and a miss blocks the post with an admin notice.