You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: