From 4ea15367c7e70d798a4441f3212e0784bb4fd4af Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 19 Jan 2022 20:29:24 +0500 Subject: [PATCH] =?UTF-8?q?=D0=95=D1=89=D1=91=20=D0=BE=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=20=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Fun/horserace.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/Fun/horserace.js b/commands/Fun/horserace.js index 0306ac7d..417920b2 100644 --- a/commands/Fun/horserace.js +++ b/commands/Fun/horserace.js @@ -136,15 +136,17 @@ class Horserace extends Command { guildID: message.guild.id }); + const toAdd = Math.floor(winnings[j][1]) - Object.values(thisGame.bets)[j].amount; + const info = { user: message.translate("economy/transactions:HORSERACE"), - amount: Math.floor(winnings[j][1]), + amount: toAdd, date: Date.now(), type: "got" }; memberData.transactions.push(info); - memberData.money += Math.floor(winnings[j][1]); + memberData.money += toAdd; memberData.save(); }