sub commands
very new to sapphire stuff. discord.js in general. but heres my code.. and here's my error
const { MessageEmbed, MessageActionRow, MessageButton, } = require(`discord.js`);
const { Command } = require("@sapphire/framework");
const { Subcommand } = require('@sapphire/plugin-subcommands');
class HelpCommand extends Subcommand {
constructor(context, options) {
super(context, { ...options });
}
registerApplicationCommands(registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName("help")
.setDescription("Get help on how to use bot")
.setDMPermission(false)
.addSubCommand(subcommand =>
subcommand
.setName("general_commands")
.setDescription("Shows list of general bot commands")
)
.addSubCommand(subcommand =>
subcommand
.setName("fun_commands")
.setDescription("Shows list of fun bot commands")
)
.addSubCommand(subcommand =>
subcommand
.setName("moderation_commands")
.setDescription("Shows list of moderation bot commands")
),
{
guildIds: ["1042213001564000298"],
}
);
}
const { MessageEmbed, MessageActionRow, MessageButton, } = require(`discord.js`);
const { Command } = require("@sapphire/framework");
const { Subcommand } = require('@sapphire/plugin-subcommands');
class HelpCommand extends Subcommand {
constructor(context, options) {
super(context, { ...options });
}
registerApplicationCommands(registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName("help")
.setDescription("Get help on how to use bot")
.setDMPermission(false)
.addSubCommand(subcommand =>
subcommand
.setName("general_commands")
.setDescription("Shows list of general bot commands")
)
.addSubCommand(subcommand =>
subcommand
.setName("fun_commands")
.setDescription("Shows list of fun bot commands")
)
.addSubCommand(subcommand =>
subcommand
.setName("moderation_commands")
.setDescription("Shows list of moderation bot commands")
),
{
guildIds: ["1042213001564000298"],
}
);
}
3 Replies