Discord.Addons.Interactive icon indicating copy to clipboard operation
Discord.Addons.Interactive copied to clipboard

InteractiveService does not work with DiscordShardedClient

Open EBro912 opened this issue 7 years ago • 3 comments

I don't know if this is just me, but trying to use this with a DiscordShardedClient as the client results in the bot not even starting, resulting in the error: Unhandled Exception: System.InvalidOperationException: Unable to resolve service for type 'Discord.WebSocket.DiscordSocketClient' while attempting to activate 'Discord.Addons.Interactive.InteractiveService'.

I looked at the code and saw that the InteractiveService only used a DiscordSocketClient. I tested the bot with SocketClient instead of ShardedClient and it worked fine. Would there be a way for it to use both Sharded and Socket?

EBro912 avatar Sep 15 '18 21:09 EBro912

Did you ever find a fix, I am having the same issue but require the interactive module.

edit Sorry for necro spam

Nyu5135 avatar Nov 11 '18 23:11 Nyu5135

Unfortunately no, I had to manually change all of the code to SocketShardedClient myself, then I was able to get it to start. I could try and create a way for both Clients to be supported, although the only thing I have put together at the moment is the code I changed for myself.

EBro912 avatar Nov 11 '18 23:11 EBro912

Sorry for the necro, but it looks like it does support it now. However it hasn't been updated on NuGet, would it be possible to?

Erlite avatar Jan 22 '19 18:01 Erlite