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.
This commit is contained in:
Armano den Boef
2022-02-03 19:04:23 +01:00
committed by GitHub
parent 7d6f4f3b6c
commit b45aebf506

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