Skip to content Skip to sidebar Skip to footer

Erro:syntaxerror: Unexpected Token ':' In Music Bot

I am creating a music bot, and one command of he is prefix + 'play', and in the chat I put '!play + [a youtube link]', but this error appeared on the console. The code of 'play' is

Solution 1:

If its supposed to return an object, put parentheses around it, like this:

// From
module.exports.run = async (bot, message, args) => {
  ...
};

// To
module.exports.run = async (bot, message, args) => ({
  ...
});
``

Post a Comment for "Erro:syntaxerror: Unexpected Token ':' In Music Bot"