From 951fa2b7ce8998a7f4a65f1681c6a69c3190c1b2 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 19 Jan 2022 20:02:15 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D0=B8=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BC=D0=BE=D0=B3=D0=B8=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Fun/horserace.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/commands/Fun/horserace.js b/commands/Fun/horserace.js index b7af9921..7ddca1cc 100644 --- a/commands/Fun/horserace.js +++ b/commands/Fun/horserace.js @@ -106,6 +106,11 @@ class Horserace extends Command { if (winnings.length === 0) { for (let j = 0; j < Object.keys(thisGame.bets).length; j++) { if (Object.values(thisGame.bets)[j].horse !== i + 1) { + const memberData = await this.client.findOrCreateMember({ + id: Object.values(thisGame.bets)[j], + guildID: message.guild.id + }); + const info = { user: message.translate("economy/transactions:HORSERACE"), amount: Object.values(thisGame.bets)[j].amount, @@ -113,8 +118,8 @@ class Horserace extends Command { type: "send" }; - data.memberData.transactions.push(info); - data.memberData.money -= Object.values(thisGame.bets)[j].amount; + memberData.transactions.push(info); + memberData.money -= Object.values(thisGame.bets)[j].amount; } }