From b45aebf50686612c70571838a8548b013df15c08 Mon Sep 17 00:00:00 2001 From: Armano den Boef <68127614+Rozen4334@users.noreply.github.com> Date: Thu, 3 Feb 2022 19:04:23 +0100 Subject: [PATCH] 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. --- .../Info/Commands/ComponentCommandInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs b/src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs index 62195bf0c..91fe2dbf9 100644 --- a/src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs +++ b/src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs @@ -57,7 +57,7 @@ namespace Discord.Interactions public async Task ExecuteAsync(IInteractionContext context, IEnumerable paramList, IEnumerable 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