Search code examples
mongodbmongoosediscorddiscord.jscommando

How do I disable specific commands in discord.js-commando


So I have been searching for a while now but I cant find a way to disable the default commands for commando I looked at this article:How to disable defaults commands on discord.js-Commando?. But it didn't work for me here is my main.js code.


Solution

  • You can do it like this if you just want to remove the default commands but keep the default types and groups provided by commando.

    client.registry
        .registerGroups([
          ['administrator', 'administrator commands'],
          ['moderation', 'moderation commands'],
          ['members', 'member commands'],
          ['economy', 'economy'],
          ['misc', 'misc commands'],
        ])
        .registerDefaultTypes()
        .registerDefaultGroups()
        .registerDefaultCommands({
          help: false,
          prefix: false,
          ping: true,
          eval: true,
          unknownCommand: false,
          commandState: false,
        })
        .registerCommandsIn(path.join(__dirname, 'cmds'))