Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ BUG ] GetPlayer&TryGetPlayer fails with KeyNotFoundException #139

Closed
asteria121 opened this issue Jan 21, 2023 · 1 comment
Closed

[ BUG ] GetPlayer&TryGetPlayer fails with KeyNotFoundException #139

asteria121 opened this issue Jan 21, 2023 · 1 comment
Assignees
Labels
🐞Buggy Bug Buggy bug buggies.

Comments

@asteria121
Copy link


Describe the bug/issue.

GetPlayer & TryGetPlayer fails and throw exception like stacktrace below.

I wrote code with DiscordShardedClient instead of DiscordSocketClient. I also add _lavaNode.ConnectAsync() on ShardReady event. I called GetPlayer with "_lavaNode.GetPlayer(Context.Guild);".
Is there any problem with my code or need more information about my code?

Stacktrace / Screenshots

1
Dependency Injection code

Exception thrown
System.Collections.Generic.KeyNotFoundException: The given key '936820198726565949' was not present in the dictionary.
at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
at IrisBot.Modules.CommandModule.PlayMusic(String query) in D:\Develop\IrisBot\IrisBot\Modules\CommandModule.cs:line 0
at Discord.Interactions.Builders.ModuleClassBuilder.<>c__DisplayClass11_0.<g__ExecuteCallback|1>d.MoveNext()

936820198726565949 is my guild id. I test my slashcommand on this guild.

@asteria121 asteria121 added the 🐞Buggy Bug Buggy bug buggies. label Jan 21, 2023
@asteria121
Copy link
Author

  • Victoria 5.2.5, Discord.NET 3.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞Buggy Bug Buggy bug buggies.
Projects
None yet
Development

No branches or pull requests

2 participants