Discord.js如何创建未知命令,例如Commando

时间:2020-03-15 05:46:34

标签: node.js discord.js commando

在突击队里有类似

module.exports = class UnknownCommandCommand extends Command {
  constructor(client) {
    super(client, {
      name: 'unknown-command',
      group: 'util',
      memberName: 'unknown-command',
      description: 'Displays help information for when an unknown command is used.',
      examples: ['unknown-command kickeverybodyever'],
      unknown: true,
      hidden: true
    });
  }

  run(msg) {
    return msg.reply(
      `Unknown command. Use ${msg.anyUsage(
                'help',
                msg.guild ? undefined : null,
                msg.guild ? undefined : null
            )} to view the command list.`
    );
  }
};

在没有突击队的情况下如何使用此命令,或者如何在if(!cmd) send unknown command中使用它?

0 个答案:

没有答案