0

So basically in order to use discord hyperlink, I can't break the string to add the variable as I would too. I already tried to call it with $ and {} but it doesn't work.

   .addField('Shortcuts', $'[Profilo](https://twitter.com/{tweet.user.screen_name})')
kornel
  • 49
  • 6
tony
  • 1
  • 2

1 Answers1

1

You have to use a template literal, which needs backticks and ${} around the variable:

.addField('Shortcuts', `[Profilo](https://twitter.com/${tweet.user.screen_name})`)
Aplet123
  • 33,825
  • 1
  • 29
  • 55
  • You have to use backticks, not single quotes. Either copy the code from my answer or [read up on how to type backticks](https://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows). – Aplet123 Nov 30 '20 at 16:18