Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

103
Views
Formatting Discord NodeJS

I've been coding with Python for Discord but I wanted to make the switch to JS as there is more. I'm having trouble formatting a line of code, I've downloaded this music bot to test and be come familiar with JS. It was sending an embed but I want text. Here is the line of code:

if (this.textChannel) this.textChannel.send(f"Playing ๐ŸŽถ Now playing ${this.current.info.title} - Right Now!");

I know in Python it would be something like: await ctx.send(f"Playing ๐ŸŽถ Now playing ${this.current.info.title} - Right Now!").

What is the equivalent to f?

about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

In Javascript, use backticks (`) for a template string

let a = 123;
console.log(`a is ${a}`);

If you need to write backticks (for markdown code block) within a template string, you can escape them with backslashes.

let code = "I am some code";
console.log(`\`\`\`${code}\`\`\``);

about 4 years ago ยท Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!