mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 22:55:00 +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.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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue