Правильное отображение наград в number и findwords

This commit is contained in:
JonnyBro 2022-01-03 01:45:20 +05:00
parent 65c4b5b0ce
commit 5d81de4a83
14 changed files with 44 additions and 37 deletions

View file

@ -29,7 +29,7 @@ class Deposit extends Command {
}; };
if (data.memberData.money < amount) return message.error("economy/deposit:NOT_ENOUGH_CREDIT", { if (data.memberData.money < amount) return message.error("economy/deposit:NOT_ENOUGH_CREDIT", {
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"))}`
}); });
data.memberData.money = data.memberData.money - amount; data.memberData.money = data.memberData.money - amount;
@ -37,7 +37,7 @@ class Deposit extends Command {
data.memberData.save(); data.memberData.save();
message.success("economy/deposit:SUCCESS", { message.success("economy/deposit:SUCCESS", {
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"))}`
}); });
} }
}; };

View file

@ -54,9 +54,9 @@ class Credits extends Command {
dynamic: true, dynamic: true,
format: "png" format: "png"
})) }))
.addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${this.client.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) .addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${this.client.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) .addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.addField(message.translate("economy/profile:GLOBAL"), `**${globalMoney}** ${this.client.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) .addField(message.translate("economy/profile:GLOBAL"), `**${globalMoney}** ${message.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.setColor(this.client.config.embed.color) .setColor(this.client.config.embed.color)
.setFooter(this.client.config.embed.footer); .setFooter(this.client.config.embed.footer);
message.channel.send(embed); message.channel.send(embed);

View file

@ -27,7 +27,7 @@ class Pay extends Command {
const amount = Math.ceil(parseInt(sentAmount, 10)); const amount = Math.ceil(parseInt(sentAmount, 10));
if (amount > data.memberData.money) return message.error("economy/pay:ENOUGH_MONEY", { if (amount > data.memberData.money) return message.error("economy/pay:ENOUGH_MONEY", {
amount: `${amount} ${this.client.getNoun(amount, message.translate("misc:NOUNS:CREDITS:1"), message.translate("misc:NOUNS:CREDITS:2"), message.translate("misc:NOUNS:CREDITS:5"))}` amount: `${amount} ${message.getNoun(amount, 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({
@ -42,7 +42,7 @@ class Pay extends Command {
memberData.save(); memberData.save();
message.success("economy/pay:SUCCESS", { message.success("economy/pay:SUCCESS", {
amount: `${amount} ${this.client.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, amount: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`,
username: member.user.tag username: member.user.tag
}); });
} }

View file

@ -65,10 +65,10 @@ class Profile extends Command {
}]) }])
.setImage("attachment://achievements.png") .setImage("attachment://achievements.png")
.addField(message.translate("economy/profile:BIO"), userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO")) .addField(message.translate("economy/profile:BIO"), userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO"))
.addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${this.client.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) .addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${this.client.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) .addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.addField(message.translate("economy/profile:GLOBAL"), `**${globalMoney}** ${this.client.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) .addField(message.translate("economy/profile:GLOBAL"), `**${globalMoney}** ${message.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true)
.addField(message.translate("economy/profile:REPUTATION"), `**${userData.rep}** ${this.client.getNoun(userData.rep, message.translate("misc:NOUNS:POINTS:1"), message.translate("misc:NOUNS:POINTS:2"), message.translate("misc:NOUNS:POINTS:5"))}`, true) .addField(message.translate("economy/profile:REPUTATION"), `**${userData.rep}** ${message.getNoun(userData.rep, message.translate("misc:NOUNS:POINTS:1"), message.translate("misc:NOUNS:POINTS:2"), message.translate("misc:NOUNS:POINTS:5"))}`, true)
.addField(message.translate("economy/profile:LEVEL"), `**${memberData.level}**`, true) .addField(message.translate("economy/profile:LEVEL"), `**${memberData.level}**`, true)
.addField(message.translate("economy/profile:EXP"), `**${memberData.exp}/${5 * (memberData.level * memberData.level) + 80 * memberData.level + 100}** xp`, true) .addField(message.translate("economy/profile:EXP"), `**${memberData.exp}/${5 * (memberData.level * memberData.level) + 80 * memberData.level + 100}** xp`, true)
.addField(message.translate("economy/profile:REGISTERED"), message.printDate(new Date(memberData.registeredAt)), true) .addField(message.translate("economy/profile:REGISTERED"), message.printDate(new Date(memberData.registeredAt)), true)

View file

@ -46,8 +46,8 @@ class Rob extends Command {
const potentiallyLose = Math.floor(amountToRob * 1.5); const potentiallyLose = Math.floor(amountToRob * 1.5);
if (potentiallyLose > data.memberData.money) return message.error("economy/rob:NOT_ENOUGH_AUTHOR", { if (potentiallyLose > data.memberData.money) return message.error("economy/rob:NOT_ENOUGH_AUTHOR", {
moneyMin: `${potentiallyLose} ${this.client.getNoun(potentiallyLose, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, moneyMin: `${potentiallyLose} ${message.getNoun(potentiallyLose, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`,
moneyCurrent: `${data.memberData.money} ${this.client.getNoun(data.memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` moneyCurrent: `${data.memberData.money} ${message.getNoun(data.memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
}); });
const itsAWon = Math.floor(this.client.functions.randomNum(0, 100) < 25); const itsAWon = Math.floor(this.client.functions.randomNum(0, 100) < 25);
@ -59,7 +59,7 @@ class Rob extends Command {
await memberData.save(); await memberData.save();
const randomNum = Math.floor(this.client.functions.randomNum(1, 3)); const randomNum = Math.floor(this.client.functions.randomNum(1, 3));
message.sendT("economy/rob:ROB_WON_" + randomNum, { message.sendT("economy/rob:ROB_WON_" + randomNum, {
money: `${amountToRob} ${this.client.getNoun(amountToRob, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, money: `${amountToRob} ${message.getNoun(amountToRob, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`,
username: member.user.username username: member.user.username
}); });
data.memberData.money += amountToRob; data.memberData.money += amountToRob;
@ -70,8 +70,8 @@ class Rob extends Command {
const won = Math.floor(0.9 * amountToRob); const won = Math.floor(0.9 * amountToRob);
const randomNum = Math.floor(this.client.functions.randomNum(1, 3)); const randomNum = Math.floor(this.client.functions.randomNum(1, 3));
message.sendT("economy/rob:ROB_LOSE_" + randomNum, { message.sendT("economy/rob:ROB_LOSE_" + randomNum, {
fine: `${potentiallyLose} ${this.client.getNoun(potentiallyLose, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, fine: `${potentiallyLose} ${message.getNoun(potentiallyLose, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`,
offset: `${won} ${this.client.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, offset: `${won} ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`,
username: member.user.username username: member.user.username
}); });
data.memberData.money -= potentiallyLose; data.memberData.money -= potentiallyLose;

View file

@ -29,7 +29,7 @@ class Withdraw extends Command {
}; };
if (data.memberData.bankSold < amount) return message.error("economy/withdraw:NOT_ENOUGH", { if (data.memberData.bankSold < amount) return message.error("economy/withdraw: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"))}`
}); });
data.memberData.money = data.memberData.money + amount; data.memberData.money = data.memberData.money + amount;
@ -37,7 +37,7 @@ class Withdraw extends Command {
data.memberData.save(); data.memberData.save();
message.success("economy/withdraw:SUCCESS", { message.success("economy/withdraw:SUCCESS", {
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"))}`
}); });
} }
}; };

View file

@ -59,7 +59,7 @@ class Work extends Command {
if (data.memberData.workStreak >= 5) { if (data.memberData.workStreak >= 5) {
won += 200; won += 200;
embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", { embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", {
won: `${won} ${this.client.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` won: `${won} ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
})) }))
.addField(message.translate("economy/work:STREAK"), message.translate("economy/work:STREAK_CONTENT")); .addField(message.translate("economy/work:STREAK"), message.translate("economy/work:STREAK_CONTENT"));
data.memberData.workStreak = 0; data.memberData.workStreak = 0;
@ -71,7 +71,7 @@ class Work extends Command {
}; };
}; };
embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", { embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", {
won: `${won} ${this.client.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` won: `${won} ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
})) }))
.addField(message.translate("economy/work:STREAK"), award.join("")); .addField(message.translate("economy/work:STREAK"), award.join(""));
}; };

View file

@ -99,14 +99,18 @@ class FindWords extends Command {
participants: participants.map((p) => `<@${p}>`).join(", ") participants: participants.map((p) => `<@${p}>`).join(", ")
}); });
if (participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")) { if (participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")) {
const won = 150 * (participants.length * 0.5);
message.sendT("fun/findwords:CREDITS", { message.sendT("fun/findwords:CREDITS", {
winner: user.username winner: user.username,
credits: `**${won}** ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
}); });
const userdata = await this.client.findOrCreateMember({ const userdata = await this.client.findOrCreateMember({
id: user.id, id: user.id,
guildID: message.guild.id guildID: message.guild.id
}); });
userdata.money = userdata.money + (150 * (participants.length * 0.5)); userdata.money = userdata.money + won;
userdata.save(); userdata.save();
}; };
}; };

View file

@ -53,15 +53,18 @@ class Number extends Command {
}); });
if (participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")) { if (participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")) {
const won = 100 * (participants.length * 0.5);
message.sendT("fun/number:WON", { message.sendT("fun/number:WON", {
winner: msg.author.username winner: msg.author.username,
credits: `**${won}** ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
}); });
const userdata = await this.client.findOrCreateMember({ const userdata = await this.client.findOrCreateMember({
id: msg.author.id, id: msg.author.id,
guildID: message.guild.id guildID: message.guild.id
}); });
userdata.money = userdata.money + (100 * (participants.length * 0.5)); userdata.money = userdata.money + won;
userdata.save(); userdata.save();
collector.stop(msg.author.username); collector.stop(msg.author.username);
}; };

View file

@ -40,17 +40,17 @@ class Serverinfo extends Command {
.addField(this.client.customEmojis.title + message.translate("common:NAME"), guild.name, true) .addField(this.client.customEmojis.title + message.translate("common:NAME"), guild.name, true)
.addField(this.client.customEmojis.calendar + message.translate("common:CREATION"), message.printDate(guild.createdAt), true) .addField(this.client.customEmojis.calendar + message.translate("common:CREATION"), message.printDate(guild.createdAt), true)
.addField(this.client.customEmojis.users + message.translate("common:MEMBERS"), .addField(this.client.customEmojis.users + message.translate("common:MEMBERS"),
`${guild.members.cache.filter(m => !m.user.bot).size} ${this.client.getNoun(guild.members.cache.filter(m => !m.user.bot).size, message.translate("misc:NOUNS:MEMBERS:1"), message.translate("misc:NOUNS:MEMBERS:2"), message.translate("misc:NOUNS:MEMBERS:5"))}` + `${guild.members.cache.filter(m => !m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => !m.user.bot).size, message.translate("misc:NOUNS:MEMBERS:1"), message.translate("misc:NOUNS:MEMBERS:2"), message.translate("misc:NOUNS:MEMBERS:5"))}` +
"\n" + `${guild.members.cache.filter(m => m.user.bot).size} ${this.client.getNoun(guild.members.cache.filter(m => m.user.bot).size, message.translate("misc:NOUNS:BOTS:1"), message.translate("misc:NOUNS:BOTS:2"), message.translate("misc:NOUNS:BOTS:5"))}`, true "\n" + `${guild.members.cache.filter(m => m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => m.user.bot).size, message.translate("misc:NOUNS:BOTS:1"), message.translate("misc:NOUNS:BOTS:2"), message.translate("misc:NOUNS:BOTS:5"))}`, true
) )
.addField(this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true) .addField(this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true)
.addField(this.client.customEmojis.id + message.translate("common:ID"), guild.id, true) .addField(this.client.customEmojis.id + message.translate("common:ID"), guild.id, true)
.addField(this.client.customEmojis.crown + message.translate("common:OWNER"), guild.owner, true) .addField(this.client.customEmojis.crown + message.translate("common:OWNER"), guild.owner, true)
.addField(this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || 0, true) .addField(this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || 0, true)
.addField(this.client.customEmojis.channels + message.translate("common:CHANNELS"), .addField(this.client.customEmojis.channels + message.translate("common:CHANNELS"),
`${guild.channels.cache.filter(c => c.type === "text").size} ${this.client.getNoun(guild.channels.cache.filter(c => c.type === "text").size, message.translate("misc:NOUNS:TEXT:1"), message.translate("misc:NOUNS:TEXT:2"), message.translate("misc:NOUNS:TEXT:5"))}` + `${guild.channels.cache.filter(c => c.type === "text").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "text").size, message.translate("misc:NOUNS:TEXT:1"), message.translate("misc:NOUNS:TEXT:2"), message.translate("misc:NOUNS:TEXT:5"))}` +
"\n" + `${guild.channels.cache.filter(c => c.type === "voice").size} ${this.client.getNoun(guild.channels.cache.filter(c => c.type === "voice").size, message.translate("misc:NOUNS:VOICE:1"), message.translate("misc:NOUNS:VOICE:2"), message.translate("misc:NOUNS:VOICE:5"))}` + "\n" + `${guild.channels.cache.filter(c => c.type === "voice").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "voice").size, message.translate("misc:NOUNS:VOICE:1"), message.translate("misc:NOUNS:VOICE:2"), message.translate("misc:NOUNS:VOICE:5"))}` +
"\n" + `${guild.channels.cache.filter(c => c.type === "category").size} ${this.client.getNoun(guild.channels.cache.filter(c => c.type === "category").size, message.translate("misc:NOUNS:CATEGORY:1"), message.translate("misc:NOUNS:CATEGORY:2"), message.translate("misc:NOUNS:CATEGORY:5"))}`, true "\n" + `${guild.channels.cache.filter(c => c.type === "category").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "category").size, message.translate("misc:NOUNS:CATEGORY:1"), message.translate("misc:NOUNS:CATEGORY:2"), message.translate("misc:NOUNS:CATEGORY:5"))}`, true
) )
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -56,12 +56,12 @@ class Clear extends Command {
if (user) { if (user) {
toDelete = await message.success("moderation/clear:CLEARED_MEMBER", { toDelete = await message.success("moderation/clear:CLEARED_MEMBER", {
amount: `${--amount} ${this.client.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`, amount: `${--amount} ${message.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`,
username: user.tag username: user.tag
}); });
} else { } else {
toDelete = await message.success("moderation/clear:CLEARED", { toDelete = await message.success("moderation/clear:CLEARED", {
amount: `${--amount} ${this.client.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}` amount: `${--amount} ${message.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`
}); });
}; };

View file

@ -29,7 +29,7 @@ class Setwarns extends Command {
data.guild.save(); data.guild.save();
return message.success("moderation/setwarns:SUCCESS_KICK_RESET", { return message.success("moderation/setwarns:SUCCESS_KICK_RESET", {
prefix: data.guild.prefix, prefix: data.guild.prefix,
count: `${number} ${this.client.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}` count: `${number} ${message.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}`
}); });
} else if (sanction === "ban") { } else if (sanction === "ban") {
data.guild.plugins.warnsSanctions.ban = false; data.guild.plugins.warnsSanctions.ban = false;
@ -37,7 +37,7 @@ class Setwarns extends Command {
data.guild.save(); data.guild.save();
return message.success("moderation/setwarns:SUCCESS_BAN_RESET", { return message.success("moderation/setwarns:SUCCESS_BAN_RESET", {
prefix: data.guild.prefix, prefix: data.guild.prefix,
count: `${number} ${this.client.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}` count: `${number} ${message.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}`
}); });
}; };
}; };
@ -51,7 +51,7 @@ class Setwarns extends Command {
data.guild.save(); data.guild.save();
return message.success("moderation/setwarns:SUCCESS_KICK", { return message.success("moderation/setwarns:SUCCESS_KICK", {
prefix: data.guild.prefix, prefix: data.guild.prefix,
count: `${number} ${this.client.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}` count: `${number} ${message.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}`
}); });
} else if (sanction === "ban") { } else if (sanction === "ban") {
data.guild.plugins.warnsSanctions.ban = number; data.guild.plugins.warnsSanctions.ban = number;
@ -59,7 +59,7 @@ class Setwarns extends Command {
data.guild.save(); data.guild.save();
return message.success("moderation/setwarns:SUCCESS_BAN", { return message.success("moderation/setwarns:SUCCESS_BAN", {
prefix: data.guild.prefix, prefix: data.guild.prefix,
count: `${number} ${this.client.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}` count: `${number} ${message.getNoun(number, message.translate("misc:NOUNS:WARNS:1"), message.translate("misc:NOUNS:WARNS:2"), message.translate("misc:NOUNS:WARNS:5"))}`
}); });
}; };
} }

View file

@ -7,7 +7,7 @@
"FIND_WORD": "20 секунд чтобы найти слово, в котором есть **{{word}}**!", "FIND_WORD": "20 секунд чтобы найти слово, в котором есть **{{word}}**!",
"WORD_FOUND": "{{winner}} быстрее всех нашёл слово!", "WORD_FOUND": "{{winner}} быстрее всех нашёл слово!",
"GAME_STATS": "🎉 | {{winner}} победил!\n\n**Статистика:**\n*-* __**Участники**__: {{participants}} ({{participantCount}})\n**Статистика игры: **\n__**Длительность**__: {{duration}}\n__**Кол-во участников**__ : {{participantCount}}", "GAME_STATS": "🎉 | {{winner}} победил!\n\n**Статистика:**\n*-* __**Участники**__: {{participants}} ({{participantCount}})\n**Статистика игры: **\n__**Длительность**__: {{duration}}\n__**Кол-во участников**__ : {{participantCount}}",
"CREDITS": "{{winner}} выиграл 150 кредитов! 🎉", "CREDITS": "{{winner}} выиграл {{credits}}!",
"NO_WINNER_ALL": "Слова не найдены, игра окончена!", "NO_WINNER_ALL": "Слова не найдены, игра окончена!",
"NO_WINNER": "Слова не найдены, игра окончена!" "NO_WINNER": "Слова не найдены, игра окончена!"
} }

View file

@ -5,7 +5,7 @@
"GAME_START": "Я загадал число, начинайте!", "GAME_START": "Я загадал число, начинайте!",
"BIG": "{{user}} | Моё число **больше** чем `{{number}}`!", "BIG": "{{user}} | Моё число **больше** чем `{{number}}`!",
"SMALL": "{{user}} | Моё число **меньше** чем `{{number}}`!", "SMALL": "{{user}} | Моё число **меньше** чем `{{number}}`!",
"WON": "{{winner}} выиграл 100 кредитов!", "WON": "{{winner}} выиграл {{credits}}!",
"DEFEAT": "Никто не угадал число! Им было **{{number}}**!", "DEFEAT": "Никто не угадал число! Им было **{{number}}**!",
"GAME_STATS": "🎉 | {{winner}} угадал число! Им было __**{{number}}**__!\n\n**Статистика:**\n*-* __**Длительность**__: {{time}}\n*-* __**Участники**__: {{participants}} ({{participantCount}})", "GAME_STATS": "🎉 | {{winner}} угадал число! Им было __**{{number}}**__!\n\n**Статистика:**\n*-* __**Длительность**__: {{time}}\n*-* __**Участники**__: {{participants}} ({{participantCount}})",
"GAME_RUNNING": "Игра уже идёт!" "GAME_RUNNING": "Игра уже идёт!"