Я получаю сообщение об ошибке в этом конкретном блоке кода
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);
}
});
Мне пришлось поместить код для responseroles.js в pastebin. https://pastebin.com/tYebDG4Y
Измените блок reactionroles
на:
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",