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:
@@ -57,7 +57,7 @@ namespace Discord.Interactions
|
|||||||
public async Task<IResult> ExecuteAsync(IInteractionContext context, IEnumerable<CommandParameterInfo> paramList, IEnumerable<string> values,
|
public async Task<IResult> ExecuteAsync(IInteractionContext context, IEnumerable<CommandParameterInfo> paramList, IEnumerable<string> values,
|
||||||
IServiceProvider services)
|
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");
|
return ExecuteResult.FromError(InteractionCommandError.ParseFailed, $"Provided {nameof(IInteractionContext)} doesn't belong to a Component Command Interaction");
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user