From 76b44e1b716e9cae84e87a30ed6fc9e8f93457ce Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 15 Jan 2024 23:41:33 +0200 Subject: [PATCH] default amount for prune --- src/client/components/commands/moderation/Prune.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/components/commands/moderation/Prune.ts b/src/client/components/commands/moderation/Prune.ts index ab525f9..1d0931c 100644 --- a/src/client/components/commands/moderation/Prune.ts +++ b/src/client/components/commands/moderation/Prune.ts @@ -2,7 +2,7 @@ import { TextChannel } from 'discord.js'; import { CommandOptionType, CommandParams } from '../../../../../@types/Client.js'; import DiscordClient from '../../../DiscordClient.js'; import { Prune } from '../../../infractions/index.js'; -import { CommandError, ModerationCommand } from '../../../interfaces/index.js'; +import { ModerationCommand } from '../../../interfaces/index.js'; import InvokerWrapper from '../../wrappers/InvokerWrapper.js'; const flag = true, @@ -135,14 +135,14 @@ class PruneCommand extends ModerationCommand // if (!channels) throw new CommandError(interaction, { index: 'MODERATION_MISSING_CHANNELS' }); - if (!amount) - throw new CommandError(invoker, { index: 'COMMAND_PRUNE_MISSING_AMOUNT' }); + // if (!amount) + // throw new CommandError(invoker, { index: 'COMMAND_PRUNE_MISSING_AMOUNT' }); // const wrappers = await Promise.all(channels.asChannels.map(channel => this.client.getChannelWrapper(channel))); return this.client.moderation.handleInfraction(Prune, invoker, { targets: channels?.asChannels as TextChannel[] || [ invoker.channel ], data: { - amount: amount.asString + amount: amount?.asNumber ?? 100 }, args });