I need to make a command where you can get an item based on a random generator. For me to dont have to write more than 100 if, I wanted to find a way to adress the database name with a variable. I tried a lot of methods but none of them worked.
await client.userdb.updateOne({
userId: interaction.user.id
}, { $set: {
“fishes.(variable)”: currentfishes + 1
}
})
What I want to do is to make that (variable) is the name of the fish the person will receive, that will be randomized by an earlier part of the code.
Is there any way of making that?