mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
Фиксики помогите
This commit is contained in:
parent
052e2493fc
commit
951fa2b7ce
1 changed files with 7 additions and 2 deletions
|
@ -106,6 +106,11 @@ class Horserace extends Command {
|
||||||
if (winnings.length === 0) {
|
if (winnings.length === 0) {
|
||||||
for (let j = 0; j < Object.keys(thisGame.bets).length; j++) {
|
for (let j = 0; j < Object.keys(thisGame.bets).length; j++) {
|
||||||
if (Object.values(thisGame.bets)[j].horse !== i + 1) {
|
if (Object.values(thisGame.bets)[j].horse !== i + 1) {
|
||||||
|
const memberData = await this.client.findOrCreateMember({
|
||||||
|
id: Object.values(thisGame.bets)[j],
|
||||||
|
guildID: message.guild.id
|
||||||
|
});
|
||||||
|
|
||||||
const info = {
|
const info = {
|
||||||
user: message.translate("economy/transactions:HORSERACE"),
|
user: message.translate("economy/transactions:HORSERACE"),
|
||||||
amount: Object.values(thisGame.bets)[j].amount,
|
amount: Object.values(thisGame.bets)[j].amount,
|
||||||
|
@ -113,8 +118,8 @@ class Horserace extends Command {
|
||||||
type: "send"
|
type: "send"
|
||||||
};
|
};
|
||||||
|
|
||||||
data.memberData.transactions.push(info);
|
memberData.transactions.push(info);
|
||||||
data.memberData.money -= Object.values(thisGame.bets)[j].amount;
|
memberData.money -= Object.values(thisGame.bets)[j].amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue