#Interaction Framework
1 messages · Page 1 of 1 (latest)
I mean
There're docs for them
i mean how to handle it if return
return Task.FromResult(PreconditionResult.FromError("Role Not Found."));
Iirc an event should be fire on InteractionService
Which will have the result of the execution
Maybe you have some example?
I mean
Just add a handler to it
One of properties will be IResult
And iresult has .IsSuccess property
And .ErrorReason with the message you return in precondition
where i need to put IResult?
...
You need to add a handler for an event
InteractionExecuted will be triggered for all types of interactions so you probably should use it
And the handler should look like this
public async Task OnIntetactionExecuted(ICommandInfo command, IInteractionContext context, IResult result)
{
if(!result.IsSuccess)
{
// Handle error
}
}
private async Task HandleInteraction(SocketInteraction interaction)
``` like this one?
...
no
InteractionService.InteractionExexuted
This is the event you need
And the handler for it I sent above
Понимаемо
Ну как говорится - на вопросы по возможности отвечу
Hello 🙂
Рашн, сука блять, водка.
