Skip to content

Commit 2ac5f46

Browse files
committed
🧑‍💻 Exempt developers from cmd cooldown
Mainly for debugging
1 parent 6bc491f commit 2ac5f46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

events/interactionCreate.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ module.exports = {
2222
const timestamps = cooldowns.get(command.data.name);
2323
const defaultCooldownDuration = 3;
2424
const cooldownAmount = (command.cooldown ?? defaultCooldownDuration) * 1000;
25+
const ownerIDs = process.env.OWNER_IDS.split(',');
2526

26-
if (timestamps.has(interaction.user.id)) {
27+
if (timestamps.has(interaction.user.id) && !ownerIDs.includes(interaction.user.id)) {
2728
const expirationTime = timestamps.get(interaction.user.id) + cooldownAmount;
2829

2930
if (now < expirationTime) {

0 commit comments

Comments
 (0)