forked from Galactic/galactic-bot
members
This commit is contained in:
parent
219fc47741
commit
d593fe7b93
@ -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
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user