mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Ещё один фикс
This commit is contained in:
parent
9eab50ebe4
commit
4ea15367c7
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue