discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Missing Permissions to get user voice state

Open thewilloftheshadow opened this issue 1 year ago • 2 comments

Description

The Get User Voice State route does not list the needed permissions to use the route, but we are getting a Missing Access (50001) error when trying to use the route.

Steps to Reproduce

This occurs on random guilds, and we have been unable to track down exactly what the needed permission is The most recent one was https://discord.com/api/v10/guilds/1162866772320465047/voice-states/448893186941911050 but this has been occurring on around 7 of our 600 servers.

Expected Behavior

Discord provides a better error code, such as the error 10065 Unknown Voice State that we also rely on Alternatively, if this is a permissions issue, the needed permission is documented on the Discord Developer Docs

Current Behavior

We get random Missing Access errors with no documentation as to what the needed permission is

Screenshots/Videos

No response

Client and System Information

Discord.js v14.16.2 Node.js v22.6.0

thewilloftheshadow avatar Nov 03 '24 17:11 thewilloftheshadow

+1

avasilic avatar Nov 03 '24 17:11 avasilic

After doing a lot of digging and experimenting, I think that when the user we are fetching is in a VC, the app needs the CONNECT permission on that VC. However, when the user is not in a VC, the API does not error. Logically this makes sense after thinking about it, but it still needs documentation.

thewilloftheshadow avatar Nov 07 '24 20:11 thewilloftheshadow