Subcommand not registering

Hello, I was not really sure whether I should post this in #discordjs-support or #sapphire-support, but since it's an issue regarding subcommand registration, I decided to post it here!

I'm kinda new to all of this and I just made a new bot. I wanted to create a /channels command (here is the code: https://hastebin.skyra.pw/cezeqivufo.less) but when I try to run the bot, I get the following error:
2024-09-20 17:40:06 - ERROR - ApplicationCommandRegistry[channels] Failed to register application command with name "channels" DiscordAPIError[50035]: Invalid Form Body


How can I fix it?
Solution
I just replaced the new SlashCommandBuilder() with (builder) => builder and now it works!
// Pretty much like this:
export class ChannelsCommand extends Subcommand {
  public override registerApplicationCommands(registry: ChatInputCommand.Registry) {
    registry.registerChatInputCommand((builder) =>
      builder
        .setName(this.name)
        .setDescription(this.description)
        // ...
Was this page helpful?