Remove from ratelimiter if command crash

(Untested because I live on the edge)
Slash-V14
Supositware 3 weeks ago
parent 19855f82f0
commit d604f0ad8e

@ -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 });
}
},

@ -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}\`` });

Loading…
Cancel
Save