0
votes

I wanted to add a tooltip to my workinprogress bot, but I got this error.

/home/runner/simplebot/index.js:46 .setColor("#4287f5").setTitle("ToolTip Example").setDescription('Hover for tooltip': [(i)](${ message.url } 'Hey look! Its a tooltip!') ); message.channel.send(tooltipEmbed); ^^^^^^^^^^^^^^^^^^^

SyntaxError: missing ) after argument list

This is my code

      {
  const tooltipEmbed = new Discord.MessageEmbed()
    .setColor("#4287f5").setTitle("ToolTip Example").setDescription('Hover for tooltip': [(i)](${ message.url } 'Hey look! Its a tooltip!') ); message.channel.send(tooltipEmbed);
  }

Can someone help me with this?

Thanks!

-Sam

1

1 Answers

0
votes

It's due to your .setDescription. If you want a description in your embed, you'll have to use .setDescription('Whatever you want') If you take a look to your description:

.setDescription('Hover for tooltip': [(i)](${ message.url } 'Hey look! Its a tooltip!')

You see that there isn't just one string, infact, there are two, with [(i)](${ message.url } in between.

You can take a look in the docs from discord.js.