@ApplyOptions<Subcommand.Options>({
name: 'blacklist',
description: 'Blacklist users or guilds from using the bot.',
preconditions: ['OwnerOnly'],
subcommands: [
{
name: 'user',
chatInputRun: 'chatInputUser'
}
]
})
export class BlacklistCommand extends Subcommand {
public override registerApplicationCommands(
registry: ChatInputCommand.Registry
) {
registry.registerChatInputCommand(
(builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addSubcommand((command) =>
command
.setName('user')
.setDescription('Blacklist a user from using the bot.')
.addUserOption((option) =>
option
.setName('user')
.setDescription('The user to blacklist.')
.setRequired(true)
)
),
{
guildIds: config.testGuilds
}
);
}
public async chatInputUser(
interaction: Subcommand.ChatInputCommandInteraction
) {