Ещё один фикс

This commit is contained in:
JonnyBro 2022-01-19 20:29:24 +05:00
parent 9eab50ebe4
commit 4ea15367c7

View file

@ -136,15 +136,17 @@ class Horserace extends Command {
guildID: message.guild.id guildID: message.guild.id
}); });
const toAdd = Math.floor(winnings[j][1]) - Object.values(thisGame.bets)[j].amount;
const info = { const info = {
user: message.translate("economy/transactions:HORSERACE"), user: message.translate("economy/transactions:HORSERACE"),
amount: Math.floor(winnings[j][1]), amount: toAdd,
date: Date.now(), date: Date.now(),
type: "got" type: "got"
}; };
memberData.transactions.push(info); memberData.transactions.push(info);
memberData.money += Math.floor(winnings[j][1]); memberData.money += toAdd;
memberData.save(); memberData.save();
} }