import { Command } from '@sapphire/framework';
import { SlashCommandSubcommandBuilder } from 'discord.js';
// If import it from @discordjs/builders as such:
// import { SlashCommandSubcommandBuilder } from '@discordjs/builders';
// it works fine
export class BuilderBugCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { ...options });
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName('builder_bug') //
.addSubcommand(
new SlashCommandSubcommandBuilder() //
.setName('something')
)
);
}
public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
// TODO
}
}
import { Command } from '@sapphire/framework';
import { SlashCommandSubcommandBuilder } from 'discord.js';
// If import it from @discordjs/builders as such:
// import { SlashCommandSubcommandBuilder } from '@discordjs/builders';
// it works fine
export class BuilderBugCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { ...options });
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName('builder_bug') //
.addSubcommand(
new SlashCommandSubcommandBuilder() //
.setName('something')
)
);
}
public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
// TODO
}
}