From 2beeabb739048f5942765ad264078d54e8492d59 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 28 Jun 2022 14:49:07 +0300 Subject: [PATCH] lockdown commands fix --- src/structure/components/commands/moderation/Lockdown.js | 5 ++++- src/structure/components/commands/moderation/Unlockdown.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/structure/components/commands/moderation/Lockdown.js b/src/structure/components/commands/moderation/Lockdown.js index 6b1ab7e..e64d732 100644 --- a/src/structure/components/commands/moderation/Lockdown.js +++ b/src/structure/components/commands/moderation/Lockdown.js @@ -31,11 +31,14 @@ class LockdownCommand extends ModerationCommand { if (!channels) throw new CommandError(interaction, { index: 'MODERATION_MISSING_CHANNELS' }); - return this.client.moderationManager.handleInfraction(Lockdown, interaction, { + await interaction.reply({ content: 'Working...', emoji: 'loading' }); + const result = await this.client.moderationManager.handleInfraction(Lockdown, interaction, { targets: channels.value, args }); + return { content: result, _edit: true }; + } } diff --git a/src/structure/components/commands/moderation/Unlockdown.js b/src/structure/components/commands/moderation/Unlockdown.js index 3647d3c..69f3dc6 100644 --- a/src/structure/components/commands/moderation/Unlockdown.js +++ b/src/structure/components/commands/moderation/Unlockdown.js @@ -27,11 +27,14 @@ class UnlockdownCommand extends ModerationCommand { if (!channels) throw new CommandError(interaction, { index: 'MODERATION_MISSING_CHANNELS' }); - return this.client.moderationManager.handleInfraction(Unlockdown, interaction, { + await interaction.reply({ content: 'Working...', emoji: 'loading' }); + const result = await this.client.moderationManager.handleInfraction(Unlockdown, interaction, { targets: channels.value, args }); + return { content: result, _edit: true }; + } }