Discord #
The discord extension connects a session to a bot and delivers permitted
messages and reactions as session events.
extension.gleam
registers its storage, manager, service, and Python binding. See
webhooks for signed HTTP event delivery.
Setup #
The Discord service creates bots with a session, name, token, and owner ID. Its routes manage bots, channel delivery, and DM access. The terminal client and web client provide settings pages. The extension's startup starts the manager, but successful startup does not mean a bot has connected.
Channels and delivery #
ingest.gleam delivers
messages from configured channels according to their tool or turn setting.
The settings choose delivery after a tool call or after a turn. A mentions-only
channel filters messages that do not mention the bot. The owner and allowed
users can send DMs. Other DM senders create requests rather than inbox letters.
Reactions use the same delivery choices and additional filtering.
Discord messages and reactions are external conversation. They are not instructions from the user or blanket approval for an action.
Kernel binding #
discord.py exposes send, dm,
history, react, channels, and status. Channels can be addressed by
handle or name. Messages use numbers. send and dm require text or files. The
binding accepts at most ten files, each at most 10 MiB, and checks that each
path is a file. Host failures raise DiscordError.
Bot process #
manager.gleam owns
bot processes and reconciles their state.
albedo_discord.py implements the helper
process. Ordinary requests have a 15-second timeout. Catch-up uses 60 seconds.
The startup callback
registers manager shutdown with the store. A startup failure is distinct from a
bot's connection state.