DSharpPlus: VoiceNextClient.ConnectAsync never returns

I’m trying to make a bot join a voice channel, but when i call vnext.ConnectAsync from a command it never returns but i can see in the voice channel the bot actually joined, so i tryed playing some audio but vnc.SendAsync never returns as well. Both my code and the example code don’t work.

All libraries from nuget: version 3.2.2 .NETFX 4.6.1 Windows 10 Fall creators update Default WebSocket client Visual Studio 2017 No exception.

To reproduce:

[Command("join")]
        public async Task Join(CommandContext ctx)
        {
            var vnext = ctx.Client.GetVoiceNextClient();
            var vnc = vnext.GetConnection(ctx.Guild);
            var chn = ctx.Member?.VoiceState?.Channel;
            vnc = await vnext.ConnectAsync(chn);
            await ctx.RespondAsync("Connected");
        }

The answer is never sent, but in discord the bot is shown in the voice channel.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 30 (16 by maintainers)

Most upvoted comments

Voice Gateway v1 was obsoleted, and might already be out of commision. 3.2 does not support any newer version. Only 4.x implement the v2 and v3 protocol required for voice to work properly.

I updated the repo to the latest version and fixed build issues.

How to use: Image

How your output folder looks like: Image