#sub commands

1 messages · Page 1 of 1 (latest)

reef gull
#

very new to sapphire stuff. discord.js in general. but heres my code..```js
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
uncut auroraBOT
#

@reef gull to help others find answers, you can mark your question as solved via Right Click Solution Message->Apps->✅ Mark Solution

unique skiff
#

it is not a function

reef gull
#

i can see it says that. but idk how to make it right

#

oh its because i misspelled it haha