Sapphire - Imagine a framework
Sapphire - Imagine a framework

sapphire-support

Root Question Message

Fozzie
Fozzie12/19/2022
API error event handler

Hi, when I get a DiscordAPIError through the logger that starts like this:
Encountered error while handling an interaction handler run method for interaction-handler

Is there a singular event to capture these without listening to multiple events like chatInputCommandError, commandAutocompleteInteractionError and contextMenuCommandError etc?

Solution Message

Favna
Favna12/19/2022
there isn't but you can easily reuse code. Just import the same function in each listener and pass parameters.
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy