Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VoiceNextClient.ConnectAsync never returns

See original GitHub issue

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:

        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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:30 (16 by maintainers)

github_iconTop GitHub Comments

Emzi0767commented, Apr 8, 2020

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.

Kiritsucommented, Mar 20, 2020

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

How to use: Image

How your output folder looks like: Image

Read more comments on GitHub >

github_iconTop Results From Across the Web

ConnectAsync() never finishes in C# Visual Studio
ConnectAsync () just never finishes or uses an extraordinarily long time to fail with the exception "No more data is available.
Read more >
TcpClient.ConnectAsync Method (System.Net.Sockets)
The returned Returns Task object will complete after the TCP connection has been established. This method does not block the calling thread while...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found