Skip to main content

Module bot

Module bot 

Source

Modules§

audio
Low-level audio output (capability voice): the bot writes the audio itself, packet by packet or sample by sample, instead of naming tracks for the player. For synthesisers, text to speech, mixers, and bots that decode formats of their own. Output only: members’ audio is never delivered to a bot.
commands
The bot’s application commands. init’s registration is applied at start; this replaces them at run time (command.set, bulk overwrite).
community
Reads and moderation, all checked by the host against the bot’s grants and permissions.
dms
Direct-message channels with members (capability dms, specification §8.15). The member decides: FORBIDDEN (dms_closed) when they turned DMs from bots off or closed this one.
http
Outbound HTTPS to hosts in the bot’s network grant. The request leaves from the host, so the remote server learns the host’s address.
interactions
Answers to interactions (§8.14). Only the bot that received an interaction may answer it.
log
Bot output for the operator (zaun-host bot logs); rate-limited.
messages
Messages and reactions. Every call is an ordinary command on the bot’s member, checked by the host’s permission engine exactly as for any member.
presence
The bot’s own presence (specification §10.5) and custom status (§8.3), shown to every member next to its name: “Listening to lofi radio”, “🎵 Type /play”.
storage
Per-bot key-value storage, limited by the storage_bytes grant.
timers
Timers (capability timers). Each fires on-timer with its id and tag.
types
Shared data types. Shapes follow the Zaun specification §8.5, §8.13 and §8.14, which follow Discord’s interaction model. WIT has no recursive types, so nesting (containers, sections, sub-commands) is spelled out level by level.
voice
Voice channels (capability voice, ADR-0020). The host joins as the bot, end-to-end encrypted like any member, and plays audio for it in real time: the bot only says what to play. One stay per bot; CONNECT and SPEAK apply as for members. Nothing is transcoded, so audio is Opus: Ogg Opus files and streams (.opus, .ogg holding Opus), WebM Opus (audio/webm, YouTube’s itag 251) on hosts that demux it, or Opus packets the bot makes.