pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Interaction Fail Event

Open Rxann opened this issue 5 years ago • 5 comments

Summary

Add an event for when a discord Interaction fails!

What is the feature request for?

discord.ext.commands

The Problem

I am trying to solve the issue of when you use a discord component, there is a chance the interaction fails. I would like there to be an interaction failed event. This would help with giving information to the user that is triggering the interaction.

The Ideal Solution

Add an interaction fail event

The Current Solution

None

Additional Context

No response

Rxann avatar Sep 03 '21 13:09 Rxann

If discord doesn't dispatch this event, sorry for opening this

Rxann avatar Sep 03 '21 13:09 Rxann

Could you elaborate on this?

middledot avatar Sep 05 '21 20:09 middledot

Yes,

Sometimes when you use a discord component, you get an error in red text that says "interaction failed". I would like if there could be an event for when this occurs!

Rxann avatar Sep 06 '21 12:09 Rxann

The "Interaction failed" thing happens when a user interacts with a message component and you don't respond to the interaction within three seconds. If this is because of an error in your code for a button/select callback and you are using the discord.ui.View API then the on_error method of discord.ui.View will get called and it will get passed the error, the item that was interacted with and the interaction object.

esmaycat avatar Sep 06 '21 13:09 esmaycat

I'm assuming this answer is satisfactory. I'll close this.

CodeWithSwastik avatar Sep 15 '21 13:09 CodeWithSwastik