sub commands

very new to sapphire stuff. discord.js in general. but heres my code..
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"],
}
);
}
and here's my error
Solution:
oh its because i misspelled it haha
Jump to solution
3 Replies
24
242y ago
it is not a function
${RVX}
${RVX}2y ago
i can see it says that. but idk how to make it right
Solution
${RVX}
${RVX}2y ago
oh its because i misspelled it haha
Want results from more Discord servers?
Add your server