Conversation
cad8cff to
cfcd84e
Compare
|
|
||
| public IUserMessage Message { get; private set; } | ||
|
|
||
| readonly InteractiveService interactive; |
There was a problem hiding this comment.
This property should be declared as private readonly InteractiveService _interactive;, to best fit the C# style guidelines.
As well as for the property below.
|
|
||
| public async Task<bool> HandleCallbackAsync(SocketReaction reaction) | ||
| { | ||
| var reactionCallbackItem = data.Callbacks.FirstOrDefault(t => t.Reaction.Equals(reaction.Emote)); |
There was a problem hiding this comment.
== doesn't work. Its not the same instance so we really have to use Equals method.
| { | ||
| public class InlineReactionCallback : IReactionCallback | ||
| { | ||
| public RunMode RunMode => RunMode.Sync; |
There was a problem hiding this comment.
No idea to be honest, I used PaginatedMessageCallback as a template.
| <ItemGroup> | ||
| <PackageReference Include="Discord.Net.Commands" Version="1.0.1" /> | ||
| <PackageReference Include="Discord.Net.WebSocket" Version="1.0.1" /> | ||
| <PackageReference Include="Discord.Net.Commands" Version="1.0.2" /> |
There was a problem hiding this comment.
This update should be noted. Is this really necessary?
There was a problem hiding this comment.
Yes, it is. The 1.0.1 version has some bug and result is following exception
System.InvalidOperationException: Unknown guild channel type.
ghost
left a comment
There was a problem hiding this comment.
Needs changes as explained in comments
|
Any chance of getting this updated merged? I think it's quite a useful feature. |
Added InlineReactionReply.
InlineReactionReply is normal UserMessage with a set of reactions and its own callbacks.
example story:
user triggers a command
bot responds with message e.g. "Do you want 1 or 2?" and adds reactions [1, 2]
user clicks on reaction 1 or 2
a callback is fired