feat(arabot): allow mods to run. add a requirement needing delete perms

This commit is contained in:
Anthony Berg 2024-08-06 20:47:31 +02:00
parent 325dc0d0d0
commit f77758c039

View File

@ -18,6 +18,7 @@
*/ */
import { Args, Command, RegisterBehavior } from '@sapphire/framework'; import { Args, Command, RegisterBehavior } from '@sapphire/framework';
import { PermissionFlagsBits } from 'discord.js';
import type { Message } from 'discord.js'; import type { Message } from 'discord.js';
export class ClearCommand extends Command { export class ClearCommand extends Command {
@ -26,7 +27,8 @@ export class ClearCommand extends Command {
...options, ...options,
name: 'clear', name: 'clear',
description: 'Deletes 1-100 messages in bulk', description: 'Deletes 1-100 messages in bulk',
preconditions: ['CoordinatorOnly'], preconditions: [['CoordinatorOnly', 'ModOnly']],
requiredUserPermissions: [PermissionFlagsBits.ManageMessages]
}); });
} }