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

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.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();
});
}
};