Node.js TypeError:无法读取属性';执行';未定义的[不协调机器人]

Node.js TypeError:无法读取属性';执行';未定义的[不协调机器人],node.js,discord,discord.js,Node.js,Discord,Discord.js,我得到了这个特定代码块中的错误 if(!message.content.startsWith(prefix) || message.author.bot) return; const args = message.content.slice(prefix.length).split(/ +/); const command = args.shift().toLowerCase(); if(command === 'ping'){ client.

我得到了这个特定代码块中的错误

    if(!message.content.startsWith(prefix) || message.author.bot) return;

    const args = message.content.slice(prefix.length).split(/ +/);
    const command = args.shift().toLowerCase();

    if(command === 'ping'){
        client.commands.get('ping').execute(message, args);
    } else if (command == 'reactionroles'){
        client.commands.get('reactionroles').execute(message, args, Discord, client);
    }
    });
我必须将reactionroles.js的代码放入一个粘贴箱中。

反应角色
块更改为:

 else if (command == 'reactionroles')
    client.commands.get('reactionrole').execute(message, args, Discord, client);
注意,该文件名为
reactionroles.js
,但其内部方法名为
reactionrole
。因此,它找不到任何名为
reactionroles
的方法。按照
reactionroles.js
文件中的指定,该方法不包含尾随的
s

module.exports = {
    name: 'reactionrole',
    description: "Set up a reaction role message",