Well, I have a little problem. I am developing a bot, and when the user executes a daily command, he earns "money" that is added to the database. But when he adds, he ends up looking like this:
Expectation: 610 + 491 = 1101
Reality: 610 + 491 = 610491
My code:
database.ref(`Servidores/${message.guild.id}/Users/${message.author.id}/Economia`).once('value').then(async function(db){
let dbref = database.ref(`Servidores/${message.guild.id}/Users/${message.author.id}/Economia`);
//
const embed1 = new Discord.MessageEmbed()
.setColor(process.env.COLOR)
.setAuthor(` - Recompensa diária`)
.setDescription(`Você coletou sua recompensa diária!
Dinheiro Coletado: **\`R$${amount},00\`**`)
.setTimestamp()
message.channel.send(embed1)
dbref.update({
money: db.val().money+amount,
daily: Date.now()
})
}
})