Skip to content

Commit b45aebf

Browse files
authored
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.
1 parent 7d6f4f3 commit b45aebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Discord.Net.Interactions/Info/Commands/ComponentCommandInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async Task<IResult> ExecuteAsync(IInteractionContext context, IServicePro
5757
public async Task<IResult> ExecuteAsync(IInteractionContext context, IEnumerable<CommandParameterInfo> paramList, IEnumerable<string> values,
5858
IServiceProvider services)
5959
{
60-
if (context.Interaction is not SocketMessageComponent messageComponent)
60+
if (context.Interaction is not IComponentInteraction messageComponent)
6161
return ExecuteResult.FromError(InteractionCommandError.ParseFailed, $"Provided {nameof(IInteractionContext)} doesn't belong to a Component Command Interaction");
6262

6363
try

0 commit comments

Comments
 (0)