【发布时间】:2021-02-26 11:46:28
【问题描述】:
代码是:
module.exports = (client, message) => {
if (message.author.bot) return;
if (message.content.indexOf(client.config.prefix) !== 0) return;
const args = message.content.slice(client.config.prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
const cmd = client.commands.get(command);
if (!cmd) return;
cmd.run(client, message, args);
};
错误信息是:
cmd.run(client, message, args);
^
TypeError: cmd.run is not a function
任何人都知道,我可以使用什么来代替运行,或者我可以如何解决问题?
【问题讨论】:
-
您必须向我们展示您尝试执行的命令文件。奇怪的是,它导出的对象没有
run属性。
标签: discord discord.js bots