This commit is contained in:
Erik 2022-04-22 21:44:17 +03:00
parent 219fc47741
commit d593fe7b93
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

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