diff --git a/events/client/interactionCreate.js b/events/client/interactionCreate.js index a5710503..dda8b9e2 100644 --- a/events/client/interactionCreate.js +++ b/events/client/interactionCreate.js @@ -120,6 +120,8 @@ export default { } catch (error) { console.error(error); + const hasPrallelLimit = await ratelimiter.checkParallel(interaction.user, commandName, command); + if (hasPrallelLimit) ratelimiter.removeParallel(commandName); await interaction.followUp({ content: `There was an error while executing this command!\n\`${error}\``, ephemeral: true }); } }, diff --git a/events/client/messageCreate.js b/events/client/messageCreate.js index 979e54fb..9496fb44 100644 --- a/events/client/messageCreate.js +++ b/events/client/messageCreate.js @@ -459,6 +459,8 @@ export default { } catch (error) { console.error(error); + const hasPrallelLimit = await ratelimiter.checkParallel(message.author, commandName, command); + if (hasPrallelLimit) ratelimiter.removeParallel(commandName); await message.reply({ content: `There was an error while executing this command!\n\`${error}\`` }) .catch(async () => { await message.channel.send({ content: `There was an error while executing this command!\n\`${error}\`` });