From d593fe7b93ef0b75de6f17d32848d1ed8f5a5ac7 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 22 Apr 2022 21:44:17 +0300 Subject: [PATCH] members --- .../components/commands/moderation/Warn.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/structure/components/commands/moderation/Warn.js b/src/structure/components/commands/moderation/Warn.js index 28fa062..089c84e 100644 --- a/src/structure/components/commands/moderation/Warn.js +++ b/src/structure/components/commands/moderation/Warn.js @@ -8,15 +8,22 @@ class WarnCommand extends ModerationCommand { description: 'Warn users', module: 'moderation', showUsage: true, - memberPermissions: ['MODERATE_MEMBERS'] + memberPermissions: ['MODERATE_MEMBERS'], + options: [ + { + name: 'users', + type: 'MEMBERS', + description: 'Target users' + } + ] }); } - async execute(interaction, { users, ...args }) { + async execute(invoker, { users, ...args }) { - if (!users) throw new CommandError(interaction, { index: 'MODERATION_MISSING_USERS' }); + if (!users) throw new CommandError(invoker, { index: 'MODERATION_MISSING_USERS' }); - return this.client.moderationManager.handleInfraction(Warn, interaction, { + return this.client.moderationManager.handleInfraction(Warn, invoker, { targets: users.value, args });