import { ApplyOptions } from '@sapphire/decorators';
import { Command, RegisterBehavior } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
import { Subcommand } from '@sapphire/plugin-subcommands';
import type { Message } from 'discord.js';
@ApplyOptions<Subcommand.Options>({
aliases: ['sollicitatie'],
description: 'Solliciteer bij Dirk Giveaway',
subcommands: [
{
name: 'marketing',
messageRun: 'messageReset'
},
{
name: 'support',
messageRun: 'messageShow',
default: true
}
]
})
export class UserCommand extends Subcommand {
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand(builder => builder
.setName('sollicitatie')
.setDescription(this.description)
, { behaviorWhenNotIdentical: RegisterBehavior.Overwrite }
);
}
public async messageShow(message: Message) {
return send(message, 'Test - Support!');
}
public async messageReset(message: Message) {
return send(message, 'Test - Marketing!');
}
}