From b2e8e6ba13825025e5f810e1a7cc800421345e50 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 1 Jan 2022 23:36:48 +0500 Subject: [PATCH] test win event --- commands/Fun/tictactoe.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/Fun/tictactoe.js b/commands/Fun/tictactoe.js index 9d434c4d..0e36eaf0 100644 --- a/commands/Fun/tictactoe.js +++ b/commands/Fun/tictactoe.js @@ -20,6 +20,11 @@ class TicTacToe extends Command { async run(message, args) { const game = new TTT({ language: "ru" }) game.handleMessage(message); + + this.client.once("win", data => { + console.log(data.winner + " wins the TicTacToe game!"); + console.log(data.loser + " loses the TicTacToe game!"); + }); } };