diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 166d69a9..418f8c78 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -33,7 +33,7 @@ class Slots extends Command { // Gets the amount provided 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} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` }); + if (amount > data.memberData.money) return message.error("economy/slots:NOT_ENOUGH", { 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); @@ -77,8 +77,8 @@ class Slots extends Command { const credits = getCredits(amount, true); message.channel.send({ content: "**!! ДЖЕКПОТ !!**\n" + message.translate("economy/slots:VICTORY", { - 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"))}`, + 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 }) }); @@ -119,8 +119,8 @@ class Slots extends Command { const credits = getCredits(amount, false); message.channel.send({ content: message.translate("economy/slots:VICTORY", { - 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"))}`, + 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 }) }); @@ -157,7 +157,7 @@ class Slots extends Command { msg += "| : : : **" + (message.translate("common:DEFEAT").toUpperCase()) + "** : : : |"; message.channel.send({ content: message.translate("economy/slots:DEFEAT", { - money: `${amount} ${message.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 }) }); diff --git a/dashboard/routes/guild-stats.js b/dashboard/routes/guild-stats.js index b4db8a36..07bfe438 100644 --- a/dashboard/routes/guild-stats.js +++ b/dashboard/routes/guild-stats.js @@ -14,6 +14,8 @@ router.get("/:serverID", CheckAuth, async (req, res) => { }); } + const memberData = await req.client.findOrCreateMember({ id: req.userInfos.id, guildID: guild.id }); + // Fetch guild informations const membersData = await req.client.membersData.find({ guildID: guild.id @@ -43,6 +45,7 @@ router.get("/:serverID", CheckAuth, async (req, res) => { res.render("stats/guild", { user: req.userInfos, stats, + memberData: memberData, bot: req.client, guildID: guild.id, translate: req.translate, diff --git a/dashboard/views/manager/guild.ejs b/dashboard/views/manager/guild.ejs index d8f65751..77aabc81 100644 --- a/dashboard/views/manager/guild.ejs +++ b/dashboard/views/manager/guild.ejs @@ -64,25 +64,6 @@ -
-
- -
- <%= translate("dashboard:COOLDOWNS") %> - <%= translate("dashboard:REP") %>: <%= user.cooldowns.rep > Date.now() ? convertTime(user.cooldowns.rep) : translate("dashboard:CAN_USE") %> - <% for (const c in memberData.cooldowns) { %> - <% if (c !== "rob") { %> - <%= translate("dashboard:" + c.toUpperCase()) %>: <%= memberData.cooldowns[c] > Date.now() ? convertTime(memberData.cooldowns[c]) : translate("dashboard:CAN_USE") %> - <% } else { %> - <%= translate("dashboard:" + c.toUpperCase()) %>: <%= memberData.cooldowns[c] > Date.now() ? convertTime(memberData.cooldowns[c]) : translate("dashboard:NO_DEFENCE") %> - <% }; %> - <% }; %> -
- -
- -
-
diff --git a/dashboard/views/profile.ejs b/dashboard/views/profile.ejs index 4aa529f8..8ba3d16b 100644 --- a/dashboard/views/profile.ejs +++ b/dashboard/views/profile.ejs @@ -39,6 +39,7 @@
+
diff --git a/dashboard/views/stats/guild.ejs b/dashboard/views/stats/guild.ejs index 983453ed..991944d8 100644 --- a/dashboard/views/stats/guild.ejs +++ b/dashboard/views/stats/guild.ejs @@ -55,6 +55,25 @@
+
+
+ +
+ <%= translate("dashboard:COOLDOWNS") %> + <%= translate("dashboard:REP") %>: <%= user.cooldowns.rep > Date.now() ? convertTime(user.cooldowns.rep) : translate("dashboard:CAN_USE") %> + <% for (const c in memberData.cooldowns) { %> + <% if (c !== "rob") { %> + <%= translate("dashboard:" + c.toUpperCase()) %>: <%= memberData.cooldowns[c] > Date.now() ? convertTime(memberData.cooldowns[c]) : translate("dashboard:CAN_USE") %> + <% } else { %> + <%= translate("dashboard:" + c.toUpperCase()) %>: <%= memberData.cooldowns[c] > Date.now() ? convertTime(memberData.cooldowns[c]) : translate("dashboard:NO_DEFENCE") %> + <% }; %> + <% }; %> +
+ +
+ +
+
diff --git a/languages/ru-RU/economy/slots.json b/languages/ru-RU/economy/slots.json index 88a5f29d..61044629 100644 --- a/languages/ru-RU/economy/slots.json +++ b/languages/ru-RU/economy/slots.json @@ -4,5 +4,5 @@ "EXAMPLES": "{{prefix}}slots\n{{prefix}}slots 100", "DEFEAT": "**{{username}}** поставил {{money}} и всё проиграл.", "VICTORY": "**{{username}}** поставил {{money}} и выиграл {{won}}!", - "NOT_ENOUGH": "У вас должно быть хотя бы **{{money}}**." + "NOT_ENOUGH": "У вас нет {{money}}." } \ No newline at end of file