test win event

This commit is contained in:
JonnyBro 2022-01-01 23:36:48 +05:00
parent 5319acdec6
commit b2e8e6ba13

View file

@ -20,6 +20,11 @@ class TicTacToe extends Command {
async run(message, args) { async run(message, args) {
const game = new TTT({ language: "ru" }) const game = new TTT({ language: "ru" })
game.handleMessage(message); game.handleMessage(message);
this.client.once("win", data => {
console.log(data.winner + " wins the TicTacToe game!");
console.log(data.loser + " loses the TicTacToe game!");
});
} }
}; };