question-mark
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.

VoiceNext doesn't return a VoiceNextConnection, despite connecting to the channel

See original GitHub issue

Summary

VoiceNext connects to a channel, but doesn’t return a reference to the connection, or add it to the ActiveConnections Dictionary.

Details

There aren’t any exceptions, errors, or debug/trace calls. Both GetVoiceNext().ConnectAsync(channel) and channel.ConnectAsync() exit out of the method on call and don’t return anything. Trying to retrieve a connection through VoiceNextExtension.GetConnection(guild) don’t do anything, and stepping through the code shows that the ActiveConnections Dictionary is empty the entire way through.

The bot has Admin persmissions, the setup works fine, and trying to get a ref to VoiceNext through Client.GetVoiceNext() works fine.

Win10x64 .NET Core 3.1 VS2022 D#+ 4.1.0 (Latest stable, nightly builds don’t work either though)

        [Command("join")]
        public async Task JoiningCommand(CommandContext ctx, DiscordChannel channel = null)
        {
            channel = ctx.Member.VoiceState?.Channel;
            connection = await ctx.Client.GetVoiceNext().ConnectAsync(channel); // Quits here and doesn't return
            // connection = await channel.ConnectAsync(); // Doesn't work either
            Console.WriteLine("connected"); // Never gets to this line
        }

Notes

I’ve already tried stepping through the code a million times, downloaded the Natives package on NuGet, downloaded the opus and sodium dlls manually, renamed them, put them everywhere (root, runtimes folder, next to the solution, etc), and tried the nightly builds. Nothing works.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:21 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
VelvetToroyashicommented, Mar 28, 2023

Hi! Sorry about the lack of attention to this issue; it’s been brought up across the Discord the last week and we’ve been trying to make sure everything is in order for us to make a 4.4 stable release in an expedited manner. That will hopefully happen soon given there’s nothing major on our backlog. Thank you for your patience on this regardless. 😃

0reactions
airbreathercommented, Mar 29, 2023

let us know if a 4.3.1 containing the VNext fix would be useful for you

Not for me, thanks though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VoiceNextClient.ConnectAsync never returns · Issue #194
ConnectAsync from a command it never returns but i can see in the voice channel the bot actually joined, so i tryed playing...
Read more >
c# - Problem with VoiceNext extension for Dsharpplus
I've been having the issue, that when I use the "play" command on my bot (currently works only local using the path to...
Read more >
Your first digital broadcast - introduction to VoiceNext
Get the VoiceNext client. Check if the bot isn't connected already. Fail if so. Check if the user is in a voice channel....
Read more >
Transmitting | DSharpPlus
Joining a voice channel is very easy; simply use the ConnectAsync extension method on DiscordChannel. DiscordChannel channel; VoiceNextConnection connection = ...
Read more >
VoiceNEXT | Your Next Phone Company
Welcome to VoiceNEXT—Your Next Phone Company. We provide everything your business needs to connect, communicate, and collaborate.
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found