Manifest, grants and the bot card
The manifest
Section titled “The manifest”zbot pack turns zaun-bot.toml into the manifest inside the package. Unknown keys are refused,
so a typo can’t silently drop a request. The manifest is the same whether the bot is written in
TypeScript or Rust.
app_id = "org.example.weather" # lowercase reverse-DNS; one install per communityversion = "1.2.0" # updates must increase itname = "Weather" # the bot member's display name, 1-32description = "Forecasts on demand."permissions = ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"]events = ["messages"] # event groups or types to receive (default: only interactions)update_url = "https://example.org/weather/" # optional
[capabilities]message_content = false # read every message (privileged; shown to all members)members = false # list memberspresence = false # receive other members' status and activitydms = false # direct messages with membersvoice = false # join voice channels and play audiotimers = trueattachments = false # upload filesstorage_bytes = 1048576 # private storage (≤ 1 GiB)network = ["api.open-meteo.com"] # HTTPS hosts; "*.example.org" allowed as a leading label
[limits] # requests; the host may lower themmemory_bytes = 33554432cpu_ms = 200Answering an interaction doesn’t need SEND_MESSAGES; posting on its own does.
Ask for the least you need: owners see the request in plain words, and a request for
ADMINISTRATOR or message_content is a good reason to refuse a bot.
How grants are decided
Section titled “How grants are decided”What a bot may do is the intersection of what its manifest asks for, what the installer chose to
grant, and the operator’s ceiling ([bots] in the host’s configuration). Permission bits are
granted through a managed role that only the bot holds; its bits change only by a new grant.
| Capability | Meaning |
|---|---|
message_content |
receive the text of messages that don’t mention it (privileged) |
members |
list and fetch members beyond those it sees in events |
presence |
receive other members’ status and activity (presenceUpdate); setting the bot’s own presence needs nothing |
dms |
open direct messages with members (the operator may forbid it host-wide: [bots] allow_dms) |
voice |
join voice channels and play audio ([bots] allow_voice); CONNECT and SPEAK still apply per channel |
timers |
schedule timers |
attachments |
upload files for its messages |
storage_bytes |
the size of its private key-value store |
network |
the internet hosts it may contact over HTTPS |
Without message_content, the host blanks the content, embeds and attachments of messages delivered
to the bot, except messages that mention it, reply to it, that it wrote, or that are in a direct
message with it. Interactions always arrive whole.
events takes the groups messages, reactions, members (needs members), channels,
roles, typing, presence (needs presence), community, commands and dms (needs dms),
exact event types, or *. Unknown names are refused at install. See Events.
The bot card
Section titled “The bot card”Every member can open any bot’s card: name, publisher, version, signed or not, state, its permissions, whether it can read message content, the hosts it may contact, its storage and its events. Every install, update, grant change, disable and removal is announced to every member and written to the audit log.
Lifecycle
Section titled “Lifecycle”| State | Meaning |
|---|---|
enabled |
running |
disabled |
stopped by the owner; its commands are hidden |
pending_approval |
an update asks for more than the current grants; the old version keeps running |
crashed |
crashed 5 times in 10 minutes; off until the owner enables it again |