discord-api-docs
discord-api-docs copied to clipboard
Wrong Voice State Object when disconnecting a user via the Right-Click menu
Description
When observing Voice State Updates, disconnecting a user using Right-Click - Disconnect will return a Voice State Object where the field channel_id still returns the channel the user was previously connected to.
It should however return null, as the user has been disconnected from the channel.
Steps to Reproduce
Observe Voice State Update events and log channel_id of the returned Voice State Object.
Let another user (or a Bot user) join a voice channel and disconnect them using Right-Click - Disconnect.
Expected Behavior
The field channel_id of the returned Voice State Object should be null, not the channel ID of the channel the user was previously connected to.
Current Behavior
channel_id returns the ID of the channel the user was previously connected to, not null.
Screenshots/Videos
No response
Client and System Information
discord.js v14.2.0
Windows 10, although not really relevant.