Награда за выигрыш в крестики-нолики

This commit is contained in:
JonnyBro 2022-01-01 23:45:20 +05:00
parent c02881a2a4
commit 1ba2b7665e

View file

@ -22,8 +22,17 @@ class TicTacToe extends Command {
game.handleMessage(message); game.handleMessage(message);
game.on("win", data => { game.on("win", data => {
console.log(data.winner + " wins the TicTacToe game!"); message.sendT("fun/number:WON", {
console.log(data.loser + " loses the TicTacToe game!"); 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();
}); });
} }
}; };