I've been working on my discord bot for a while now and it has a mine command feature but only has one outcome gives the user 20 silver and a simple message but I want multiple answers the bot can give and different amounts of silver.
I've tried to use the 'dl.AddXp' and the message in one array but it just gives off a error.
if (command === "mine") {
var rando_choice = [
dl.AddXp(message.author.id, -20),
dl.AddXp(message.author.id, 50),
dl.AddXp(message.author.id, -10)
]
var rando_choice2 = [
"You broke your leg while mining and had to pay a doctor to help. **-20 Silver**",
"You explored a new cave and find some new ores. **+50 Silver**",
"You found nothing in the cave today."
]
if(!message.member.roles.some(r=>["Pickaxe"].includes(r.name)) )
return message.reply("You do not have a pickaxe!");
(rando_choice[Math.floor(Math.random() * rando_choice.length)]),
message.channel.send({embed: {
color: `${message.member.displayColor}`,
title: `${message.member.displayName}`,
fields: [{
name: "**MINE :pick: **",
value: (rando_choice2[Math.floor(Math.random() * rando_choice2.length)]),
},
],
timestamp: new Date(),
footer: {
icon_url: client.user.avatarURL,
}
}
});
}```