mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: check if interaction has timed out or can be replied to
This commit is contained in:
1 parent
78752c33ae
commit
c0894d214a
1 file changed
+5
@@ -62,6 +62,11 @@ module.exports = {
|
|||||||
`[Shard ${interaction.guild.shardId}] Guild ${interaction.guild.id}> Command '${interaction}' throwed and error and might have failed to execute properly.`
|
`[Shard ${interaction.guild.shardId}] Guild ${interaction.guild.id}> Command '${interaction}' throwed and error and might have failed to execute properly.`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!interaction.deferred || !interaction.replied) {
|
||||||
|
logger.warn(error, 'Interaction was not deferred or replied to, and an error was thrown.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (interaction.replied) {
|
if (interaction.replied) {
|
||||||
// If the interaction has already been replied to, most likely command executed successfully or error is already handled.
|
// If the interaction has already been replied to, most likely command executed successfully or error is already handled.
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user