Discord API · error code

Discord error 10065: Unknown voice state

Permanent - do not retryHTTP 404Unknown resource (10xxx)

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Unknown voice state

What error 10065 means

Discord has no voice state for the user you asked about, which almost always means that user is not currently connected to a voice channel in that guild. A voice state only exists while someone is in voice; the moment they leave, it is gone.

The routes that return it are the voice state endpoints under /guilds/{guild.id}/voice-states/, for example reading @me or a specific user's state, and modifying a user's state in a Stage channel (setting suppress or request_to_speak_timestamp). Stage-moderation bots see it when they try to invite someone to speak who has already left the stage.

This code is not about the bot's own voice connection to the gateway. If your music bot cannot play audio, that is a voice gateway issue. And moving or disconnecting a member who is not in voice returns 40032, not 10065.

What it looks like

{
  "message": "Unknown voice state",
  "code": 10065
}

Why it happens

  • User left the voice or Stage channel before the request arrived
  • Bot asked for its own voice state (@me) while not connected to voice in that guild
  • Guild ID points to a different server than the one the user is in voice on
  • Code relies on a cached voice state that is out of date

How to fix Discord error 10065

  1. 1Track VOICE_STATE_UPDATE events (requires the GUILD_VOICE_STATES intent) and check presence in voice before calling
  2. 2For Stage moderation, re-check that the user is still in the stage channel before modifying suppress
  3. 3If reading @me, connect the bot to the channel first
  4. 4Treat 10065 as "not in voice" and respond to the moderator accordingly

How to stop it recurring

Keep a live map of voice states from gateway events instead of polling the REST endpoint, and design voice commands to report "that user is not in voice" as a normal result. Voice presence changes in seconds, so any check should happen immediately before the action.

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

Related codes

Error 10065 - quick answers

What does Discord error 10065 mean?

Discord has no voice state for the user you asked about, which almost always means that user is not currently connected to a voice channel in that guild. A voice state only exists while someone is in voice; the moment they leave, it is gone.

How do I fix Discord error 10065?

1. Track VOICE_STATE_UPDATE events (requires the GUILD_VOICE_STATES intent) and check presence in voice before calling 2. For Stage moderation, re-check that the user is still in the stage channel before modifying suppress 3. If reading @me, connect the bot to the channel first 4. Treat 10065 as "not in voice" and respond to the moderator accordingly

Should I retry after error 10065?

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.