1

I'm getting the error in this specific block of code

    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);
    }
    });

I had to put the code for reactionroles.js into a pastebin. https://pastebin.com/tYebDG4Y

1 Answer 1

1

Change the reactionroles block to:

 else if (command == 'reactionroles')
    client.commands.get('reactionrole').execute(message, args, Discord, client);

Note the file is called reactionroles.js, but its inner method is called reactionrole. So it can't find any method with the name reactionroles. As specified in your reactionroles.js file, the method doesn't contain the trailing s:

module.exports = {
    name: 'reactionrole',
    description: "Set up a reaction role message",
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.