DawnbrandBots/bastion-bot

Don't follow up or double log on "Unknown interaction" failures

Opened this issue · 0 comments

This fix applies to Emcee as well.

Sometimes Discord takes too long to send the bot the interaction, so even if the bot immediately replies, it is past the three-second window and thus gets Unknown interaction. The error handler attempts to reply or follow up on any exception when running a command, but this will also fail since the interaction has expired. This ends up double-logging "Unknown interaction". Do not attempt to follow up when the exception type is "Unknown interaction".