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;
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 `.