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 });