mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Награда за выигрыш в крестики-нолики
This commit is contained in:
parent
c02881a2a4
commit
1ba2b7665e
1 changed files with 11 additions and 2 deletions
|
@ -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();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue