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

186
Views
Discord.JS For Every Request Reply With a New Code

I am trying to make something work. When they do [!btc] it sends an embed where it shows a address code from blockchain.com

Is it possible for every new request to send a new address code?

My current code:

case "btc":
          const btc = new Discord.MessageEmbed()
            .setColor('#003087')
            .setTitle('Payment Method: Bitcoin! <:btc:878247766067908610>')
            .setDescription("Bitcoin Adress: **code**")
            .setFooter("Created and Developed by ❤️")
          //message.channel.send()
          setTimeout(() => {
            message.channel.send(btc);
          }, 5500);
          message.delete();
          message.channel.send(`<a:loading:885542082234629809> Please wait..`)
            .then((msg) => {
              setTimeout(function () {
                msg.edit(`${message.author.toString()}.`);
              }, 5000)
            });
          break;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think you want a dynamic value, if I understand your question right, for code. If this is the case, this goes in your embed description, and you can change it to take a variable. you have right now:

.setDescription("Bitcoin Adress: **code**")

get your variable, load it with what you want, and call it newCode. Change your string to use variables with text:

.setDescription(`Bitcoin Adress: ***${newCode}***`)

keep the "*" if you want them, I preserved, in case that's the formatting you want. also note the change in quotes from double to `.

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!