Browse Source

fix: Rest message components cannot pass through execute method (#2076)

Line 60 should be equal to line 42 here. Currently rest interactions cant execute the messagecomponent handlers.
tags/3.3.0
Armano den Boef GitHub 3 years ago
parent
commit
b45aebf506
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs

+ 1
- 1
src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs View File

@@ -57,7 +57,7 @@ namespace Discord.Interactions
public async Task<IResult> ExecuteAsync(IInteractionContext context, IEnumerable<CommandParameterInfo> paramList, IEnumerable<string> values,
IServiceProvider services)
{
if (context.Interaction is not SocketMessageComponent messageComponent)
if (context.Interaction is not IComponentInteraction messageComponent)
return ExecuteResult.FromError(InteractionCommandError.ParseFailed, $"Provided {nameof(IInteractionContext)} doesn't belong to a Component Command Interaction");

try


Loading…
Cancel
Save