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!'); }}
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!'); }}
2024-04-23 21:57:10 - ERROR - Encountered error on chat input command "sollicitatie" at path "C:\Users\femke\OneDrive\Documents\BOTDIRK\DirkBot\dist\commands\General\sollicitatie.js" UserError: No subcommand was matched with the provided command.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
S-IaF
Sapphire - Imagine a Framework
Sapphire is a next-gen object-oriented Discord.js bot framework.