Discord.Net icon indicating copy to clipboard operation
Discord.Net copied to clipboard

[Bug]: Missing VOICE_STATE_UPDATE event for users becoming speakers in a Stage channel

Open Fry2412 opened this issue 1 year ago • 1 comments

Check The Docs

  • [X] I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • [X] I verified the issue was caused by Discord.Net.

Check your intents

  • [X] I double checked that I have the required intents.

Description

Honestly, I don't know if this is an API or Discord.Net issue

Description.

I noticed that the VOICE_STATE_UPDATE event in the Discord.Net package fires correctly when a user enters, leaves or becomes a listener in a Stage channel. However, the event will not fire when a user goes from being a listener to a speaker in the Stage channel.

Steps to Reproduce:

  1. create a stage channel in a Discord server.
  2. connect a user to the Stage channel as a listener. Observe that the VOICE_STATE_UPDATE event is triggered.
  3. let the user become the speaker in the stage channel.
  4. observe that the VOICE_STATE_UPDATE event is not triggered.

Expected behavior

The VOICE_STATE_UPDATE event should also fire when a user goes from being a listener to a speaker in the Stage channel. This allows changes in the user`s voice state to be tracked comprehensively and responded to accordingly.

Actual Behavior:

The VOICE_STATE_UPDATE event is not triggered when a user goes from being a listener to a speaker in the Stage channel. This misses an important feature to react appropriately to these changes in voice state.

Additional Context:

This issue impacts applications that use stage channels and need to monitor users' voice state. Adding an event for this situation would improve functionality and allow more accurate tracking of voice state changes.

I am happy to assist in resolving this issue if needed. Thank you very much for your support!

Version

3.11.0

Working Version

No response

Logs

n.a.

Sample

No response

Packages

  • Discord.Net
  • Microsoft.AspNet.SignalR.SelfHost
  • Microsoft.Extensions.Configuration
  • Microsoft.Extensions.Configuration.Json
  • Microsoft.Extensions.DependencyInjection
  • MongoDB.Driver

Environment

  • OS: Windows 11 22H2 22621.1992
  • Architecture: x64
  • SDK: .NET sdk 7.0.101

Fry2412 avatar Aug 16 '23 11:08 Fry2412

@quinchs https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.WebSocket/DiscordSocketClient.cs#L2283-L2306 Should we invoke the UserVoiceStateUpdated even if we also invoke RequestToSpeak or SpeakerAdded/Removed events? There's a bit of inconsistency in current implementation

Misha-133 avatar Aug 16 '23 12:08 Misha-133