VoiceNextConnection UserSpeaking handler only being called once per user

Created by: LilPidgey

Summary

When using the UserSpeaking event, the handler is only called a single time per user in the instance of the VoiceNextConnection. Never handled more than once per user.

Details

.NET 5 C# 9 DSharpPlus 4.1.0 nightly 897 DSharpPlus 4.0.1 (both tested)

_connection.UserSpeaking += delegate(VoiceNextConnection sender, UserSpeakingEventArgs args)
{
    if (args.User.Id == userId)
    {
        currentlPlaying = args.Speaking;
    }

    return Task.CompletedTask;
};

When debugging this code and break pointing the body of the if statement, it will only hit this break point once regardless of how many times "userId" starts or stops speaking. The one time this break point is hit (per user) "Speaking" has the value of true.

For example (Friend A, B) Friend A Speaking -> Handler is called (Speaking = true) Friend A Stops Speaking -> Nothing Occurs Friend B Speaking -> Handler is called (Speaking = true) Friend A Speaking -> Nothing Occurs

Steps to reproduce

  1. Follow this guide for connecting to a voice chat https://dsharpplus.readthedocs.io/en/stable/articles/voicenext.html
  2. Set an event handler for the current instance of VoiceNextConnection
  3. Begin speaking and make pauses to deactivate your Speaking state.