From 1ba2b7665e34fc3d83e1562a12eaec52ede61f8b Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 1 Jan 2022 23:45:20 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D0=B3=D1=80=D0=B0=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=B7=D0=B0=20=D0=B2=D1=8B=D0=B8=D0=B3=D1=80=D1=8B=D1=88=20?= =?UTF-8?q?=D0=B2=20=D0=BA=D1=80=D0=B5=D1=81=D1=82=D0=B8=D0=BA=D0=B8-?= =?UTF-8?q?=D0=BD=D0=BE=D0=BB=D0=B8=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Fun/tictactoe.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/commands/Fun/tictactoe.js b/commands/Fun/tictactoe.js index afea26d5..1799b264 100644 --- a/commands/Fun/tictactoe.js +++ b/commands/Fun/tictactoe.js @@ -22,8 +22,17 @@ class TicTacToe extends Command { game.handleMessage(message); game.on("win", data => { - console.log(data.winner + " wins the TicTacToe game!"); - console.log(data.loser + " loses the TicTacToe game!"); + message.sendT("fun/number:WON", { + winner: data.winner.displayName + }); + + const userdata = await this.client.findOrCreateMember({ + id: data.winner.id, + guildID: message.guild.id + }); + + userdata.money = userdata.money + 100; + userdata.save(); }); } };