Фиксы

This commit is contained in:
JonnyBro 2022-01-19 18:48:21 +05:00
parent 6ede349b47
commit 744b001f56
2 changed files with 5 additions and 5 deletions

View file

@ -105,7 +105,7 @@ class Horserace extends Command {
} else { } else {
let winners = ""; let winners = "";
for (let j = 0; j < winnings.length; j++) { for (let j = 0; j < winnings.length; j++) {
winners += `\n<@${winnings[j][0]}> выиграл **${winnings[j][1]}** ${message.getNoun(winnings[j][1], message.translate("misc:NOUNS:CREDITS:1"), message.translate("misc:NOUNS:CREDITS:2"), message.translate("misc:NOUNS:CREDITS:5"))}!`; winners += `\n<@${winnings[j][0]}> выиграл **${Math.floor(winnings[j][1])}** ${message.getNoun(Math.floor(winnings[j][1]), message.translate("misc:NOUNS:CREDITS:1"), message.translate("misc:NOUNS:CREDITS:2"), message.translate("misc:NOUNS:CREDITS:5"))}!`;
const memberData = await this.client.findOrCreateMember({ const memberData = await this.client.findOrCreateMember({
id: winnings[j][0], id: winnings[j][0],
@ -114,14 +114,14 @@ class Horserace extends Command {
const info = { const info = {
user: message.translate("economy/transactions:HORSERACE"), user: message.translate("economy/transactions:HORSERACE"),
amount: winnings[j][1], amount: Math.floor(winnings[j][1]),
date: Date.now(), date: Date.now(),
type: "got" type: "got"
}; };
data.memberData.transactions.push(info); data.memberData.transactions.push(info);
memberData.money += winnings[j][1]; memberData.money += Math.floor(winnings[j][1]);
memberData.save(); memberData.save();
} }

View file

@ -8,7 +8,7 @@
"HORSE_NAME": "Лошадь {{number}}", "HORSE_NAME": "Лошадь {{number}}",
"HORSE_VALUE": "Скорость - {{speed}}\nПрибыль - {{profit}}%", "HORSE_VALUE": "Скорость - {{speed}}\nПрибыль - {{profit}}%",
"BET": "**{{user}}** поставил {{amount}} на лошадь **{{horse}}**!", "BET": "**{{user}}** поставил {{amount}} на лошадь **{{horse}}**!",
"NO_WINNERS": "Победила лошадь {{horse}}. Никто не выиграл кредиты!", "NO_WINNERS": "Победила лошадь **{{horse}}**. Никто не выиграл кредиты!",
"WINNERS": "Победила лошадь {{horse}}. {{winners}}!", "WINNERS": "Победила лошадь **{{horse}}**. {{winners}}!",
"GAME_RUNNING": "Игра уже идёт!" "GAME_RUNNING": "Игра уже идёт!"
} }