diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 1ab7dc2c..221215c7 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -34,7 +34,7 @@ class Slots extends Command { let amount = args[0]; if (!amount || isNaN(amount) || amount < 1) amount = 50; if (amount > data.memberData.money) return message.error("economy/slots:NOT_ENOUGH", { - money: `${amount} ${this.client.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` + money: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` }); amount = Math.round(amount); @@ -78,8 +78,8 @@ class Slots extends Command { tmsg.edit(msg); const credits = getCredits(amount, true); message.channel.send("**!! ДЖЕКПОТ !!**\n" + message.translate("economy/slots:VICTORY", { - money: `${amount} ${this.client.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, - won: `${credits} ${this.client.getNoun(credits, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + money: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + won: `${credits} ${message.getNoun(credits, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, username: message.author.username })); const toAdd = credits - amount; @@ -133,7 +133,7 @@ class Slots extends Command { msg += "| : : : **" + (message.translate("common:DEFEAT").toUpperCase()) + "** : : : |"; message.channel.send(message.translate("economy/slots:DEFEAT", { - money: `${amount} ${this.client.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + money: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, username: message.author.username })); data.memberData.money = data.memberData.money - amount; diff --git a/helpers/extenders.js b/helpers/extenders.js index a594e72b..1495706f 100644 --- a/helpers/extenders.js +++ b/helpers/extenders.js @@ -48,6 +48,10 @@ Message.prototype.convertTime = function (time, type, noPrefix) { return this.client.convertTime(time, type, noPrefix, (this.guild && this.guild.data) ? this.guild.data.language : null); }; +Message.prototype.getNoun = function(number, one, two, five) { + return this.client.getNoun(number, one, two, five); +}; + MessageEmbed.prototype.errorColor = function () { this.setColor("#FF0000");