Discord API · error code

Discord error 40032: Target user is not connected to voice

Permanent - do not retryHTTP 400Validation and request shape

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Target user is not connected to voice

What error 40032 means

You attempted a voice-state action on a member (moving them to another voice channel, server-muting or deafening them, or disconnecting them by setting channel_id to null) but that member is not currently in any voice channel in the guild. Voice moderation endpoints operate on a live voice state; with no voice state there is nothing to act on.

It is a race more often than a bug. A moderator runs /move or /disconnect, the target leaves voice a second earlier, and the API call lands on an empty state. Music and temporary-voice-channel bots that move users into a freshly created channel also see it when the user drops out of voice mid-flow. Note that setting mute or deaf on a member who is not in voice is one of the documented situations that returns this error.

What it looks like

{
  "message": "Target user is not connected to voice",
  "code": 40032
}

Why it happens

  • Member left voice between command invocation and API call
  • Stale voice state cache in your bot (for example after a reconnect) showing a user in voice who has since left
  • Acting on the wrong user ID
  • Trying to server-mute or deafen a member who is not in a voice channel

How to fix Discord error 40032

  1. 1Re-read the member's voice state right before the action (GET /guilds/{guild.id}/voice-states/{user.id}) and skip if channel_id is null
  2. 2Handle VOICE_STATE_UPDATE events to keep your cache current, and make sure the Guild Voice States intent (GUILD_VOICE_STATES) is enabled
  3. 3Return a user-facing message such as "that user is not in a voice channel" instead of an error
  4. 4For mute/deafen, wait until the member joins voice and apply the state then

How to stop it recurring

Treat voice presence as a precondition that must be checked at execution time, not at command parse time. Subscribe to voice state events and keep a per-guild map of user to channel so the check is cheap and current.

Voice state is the most volatile state a bot consumes, so design commands to re-check it at the last moment. The voice-related channel fields (bitrate, user limits) are on the Discord limits page, and a target who left the guild entirely fails earlier with 10007.

Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.

Related codes

Error 40032 - quick answers

What does Discord error 40032 mean?

You attempted a voice-state action on a member (moving them to another voice channel, server-muting or deafening them, or disconnecting them by setting channel_id to null) but that member is not currently in any voice channel in the guild. Voice moderation endpoints operate on a live voice state; with no voice state there is nothing to act on. It is a race more often than a bug.

How do I fix Discord error 40032?

1. Re-read the member's voice state right before the action (GET /guilds/{guild.id}/voice-states/{user.id}) and skip if channel_id is null 2. Handle VOICE_STATE_UPDATE events to keep your cache current, and make sure the Guild Voice States intent (GUILD_VOICE_STATES) is enabled 3. Return a user-facing message such as "that user is not in a voice channel" instead of an error 4. For mute/deafen, wait until the member joins voice and apply the state then

Should I retry after error 40032?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Discord by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.