From bdd6ce6d871c77e232636e42649050a4ab26bb66 Mon Sep 17 00:00:00 2001 From: dev-737 <73829355+dev-737@users.noreply.github.com> Date: Sun, 11 Feb 2024 12:51:42 +0530 Subject: [PATCH] refactor: changename `setCooldown()` to `setUserCooldown()` --- src/commands/BaseCommand.ts | 4 ++-- src/commands/slash/Main/hub/create.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/BaseCommand.ts b/src/commands/BaseCommand.ts index 935ccdc0..fdfa5081 100644 --- a/src/commands/BaseCommand.ts +++ b/src/commands/BaseCommand.ts @@ -40,7 +40,7 @@ export default abstract class BaseCommand { return true; } - this.setCooldownFor(interaction); + this.setUserCooldown(interaction); return false; } @@ -79,7 +79,7 @@ export default abstract class BaseCommand { return remainingCooldown || 0; } - setCooldownFor(interaction: RepliableInteraction): void { + setUserCooldown(interaction: RepliableInteraction): void { if (!this.cooldown) return; if (interaction.isChatInputCommand()) { diff --git a/src/commands/slash/Main/hub/create.ts b/src/commands/slash/Main/hub/create.ts index 35c70679..a34c6f41 100644 --- a/src/commands/slash/Main/hub/create.ts +++ b/src/commands/slash/Main/hub/create.ts @@ -170,7 +170,7 @@ export default class Create extends Hub { .setTimestamp(); const command = Hub.subcommands.get('create'); - command?.setCooldownFor(interaction); + command?.setUserCooldown(interaction); await interaction.editReply({ embeds: [successEmbed] }); }