Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
# discord
The `discord` extension gives a session its own Discord bot. Messages the bot may see reach the session through the daemon's event inbox (the same durable `mail` table and dispatcher webhooks use), and the session answers through the `discord` binding in its kernel. The extension is installed but **disabled by default**; enable it globally in `/extensions` to run bots and mount its HTTP service. A bot whose extension is off globally does not connect and reports state `disabled`.
The table initialiser only creates storage. Its `StartupPlugin` starts the bot manager after the extension schema transaction commits, before runtime readiness.
## Setup
1. In the Discord developer portal, create an application, open **Bot**, press **Reset Token** and copy the token. On the same page enable the **Message Content** intent; without it the gateway closes with 4014 and the bot fails with that reason.
2. Open the Discord page (`/discord`), press `ctrl+o`, and give the bot a name (1–64 characters), the session it belongs to (one bot per session), the token, and your own Discord user ID. To copy your ID, turn on Settings → Advanced → Developer Mode, then right-click yourself → Copy User ID. You, the owner, can always DM the bot.
3. Invite the bot with the page's invite URL (`ctrl+l` copies it): `https://discord.com/oauth2/authorize?client_id=<application_id>&scope=bot&permissions=274878024768`, which grants View Channel, Send Messages, Embed Links, Attach Files, Read Message History, Add Reactions and Send Messages in Threads. Before the bot's first READY, the application id is read from the token's first segment.
4. On the bot's Channels pane, choose what each channel delivers. Channels start **off**.
The token never leaves the daemon except into the bot process's environment. Listings and the kernel never include it.
## Channels and delivery
A `discord_channels` row means the bot sees that channel; no row means off. Each row sets a delivery:
- `turn` (end of turn): a message waits for a running turn to end, t…