Skip to content
Guides

Follow users in Discord voice with OpenClaw

Residency that tracks selected people, the three join modes, the STT-TTS pipeline, agent-proxy sessions and targets, live run control by voice, and echo-heavy barge-in tuning

6 min read

For a personal or operator setup, the natural voice behaviour is for the bot to be wherever you are. OpenClaw’s follow mode makes the Discord voice bot track selected users as they move between voice channels, joining when a followed user joins an allowed channel, moving when they move, and leaving when they disconnect. Here is the configuration and its rules, how it compares to the other join modes, the audio pipeline, how voice sessions map to agent sessions and targets, what a delegated run understands when you talk to it, and the tuning for rooms that hear their own playback.

Follow rules

  • The follow-users list accepts raw Discord user ids or prefixed ids and normalises both; the enable flag defaults to on when the list is configured and can be set off to keep the list without automatic following; and the list controls voice residency only, granting no speaker access or owner authority, which come from the command owners and guild or channel users and roles.
  • If several followed users are in one guild and the active one leaves, the bot moves to another tracked user’s channel before leaving the guild, and when several move at once the latest voice-state event wins; the allowed-channels list still applies, so a followed user in a disallowed channel is ignored and the session moves on or leaves.
  • Missed voice-state events are reconciled at startup and at a bounded interval, sampling configured guilds and capping REST lookups per run, so very large lists may take more than one interval to converge; a bot moved by Discord or an admin rebuilds its session and keeps follow ownership when the destination is allowed, and encryption recovery that leaves and rejoins the same channel keeps it too.
  • Three join modes: follow for personal or operator setups where the bot should be in voice when you are, auto-join for fixed rooms with the when-occupied flag when the bot should be present only while humans are, and the manual join command for one-off rooms where automatic presence would be surprising.
followUsers controls voice residency only. It does not grant speaker access or owner authority; configure commands.ownerAllowFrom and guild or channel users and roles separately.

Pipeline and sessions

Voice receive decodes with the bundled WebAssembly Opus codec, realtime playback encodes raw 48 kilohertz stereo PCM to Opus with the same package, and file or provider-stream playback transcodes through ffmpeg first. In the STT-TTS pipeline, captured PCM becomes a WAV temp file, the media audio setting handles transcription, batch capture respects the largest applicable audio input limit and stops oversized captures with a warning rather than transcribing partial audio, the transcript goes through Discord ingress and routing while the response model runs under a voice-output policy that hides the agent’s TTS tool and asks for text, the voice model overrides only that response model, and the voice TTS block is merged over the global one with streaming providers feeding the player directly. With no agent-session block, each voice channel gets its own routed session, the realtime model is only the front end, substantive requests go to the configured agent, and a final transcript produced without the consult tool forces the consult as a fallback. A target of a channel id or the bare id routes voice through that text channel’s session, and a DM or user form through that direct-message session, with the supervisor agent still free to use its message tools, including sending a separate Discord message when that is the right action.

Run control and echo

  • While a delegated run is active, command-authorised voice transcripts are treated as live run control before starting another turn: phrases such as status, cancel that, use the smaller fix, or when you are done also check tests are classified as status, cancel, steering or follow-up, and the outcome is spoken back so the caller knows whether it was handled; a cancelled consult records cancellation rather than failure, late provider tool calls get the same terminal cancellation, and the session stays available for the next request.
  • For a model that hears its own playback through an open mic, the echo-heavy example keeps the provider from auto-interrupting on raw input audio while barge-in lets Discord speaker-start events and active speaker audio cancel responses, and a minimum audio-end threshold, five hundred milliseconds in the example, treats very early signals as likely echo so the model is not cut off at the first playback frame.
  • The docs list the log lines to expect: joining with the voice, supervisor, session mode and models; the realtime bridge starting with its auto-respond, interrupt and barge-in flags; speaker turns opening and closing with byte counts; skipped stale speech with its reason; playback finishing, buffering and stopping; consults requested and answered; exact speech queued and dequeued when the player idles; barge-in detected and requested; and model interrupts requested, truncated, confirmed or ignored as echo.

OpenClaw in Discord voice channels is the full voice surface these modes live in, and OpenClaw on Discord the channel and the intents it needs.

Voice as a control surface

The interesting part of follow mode is not the following but what it enables: an agent that is in the room when you are, that you can steer, cancel or query mid-run by talking, and whose answers come back in the same channel. Steering an active OpenClaw run is the text equivalent of those spoken run-control phrases, and OpenClaw sessions explains the routed sessions a target form selects.

On Diali

On Diali follow mode is part of the same self-run voice block as the rest of Discord voice, while the Discord bot itself is connected from the dashboard; the residency rules would apply unchanged once voice is enabled. Hosted OpenClaw on Diali is the assistant and Diali security describes the boundary around it.

  • Follow, auto-join or manual join: three ways into a room.
  • Residency grants nothing; owners and roles still decide.
  • Status, cancel, steer and follow up, all by voice.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.