Indium
Indium
SIASapphire - Imagine a framework
Created by Indium on 4/23/2024 in #sapphire-support
Error please help
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.
29 replies