From 25983d2c273cb72df41e10cf8e68f9c4d75a79e2 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Thu, 13 Jan 2022 22:53:33 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/routes/user.js | 5 +++-- dashboard/views/user.ejs | 18 +++++++++--------- languages/ru-RU/economy/birthdate.json | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/dashboard/routes/user.js b/dashboard/routes/user.js index 75570fd4..001606f7 100644 --- a/dashboard/routes/user.js +++ b/dashboard/routes/user.js @@ -13,9 +13,9 @@ router.get("/:userID/:serverID", CheckAuth, async function (req, res) { currentURL: `${req.client.config.dashboard.baseURL}${req.originalUrl}` }); } - const guildData = await req.client.findOrCreateGuild({ id: guild.id }); - await utils.fetchUser({ + + const userInfos = await utils.fetchUser({ id: req.params.userID }, req.client).catch(() => { res.render("404", { @@ -27,6 +27,7 @@ router.get("/:userID/:serverID", CheckAuth, async function (req, res) { res.render("user", { user: req.userInfos, + userInfos: userInfos, guild: guildData, bot: req.client, translate: req.translate, diff --git a/dashboard/views/user.ejs b/dashboard/views/user.ejs index 336542ec..d27bb579 100644 --- a/dashboard/views/user.ejs +++ b/dashboard/views/user.ejs @@ -27,19 +27,19 @@
-

<%= user.tag %>

+

<%= userInfos.tag %>

<%= bot.guilds.cache.get(guild.id).name %>

ID: <%= guild.id %>

- User Avatar + User Avatar
@@ -66,7 +66,7 @@
<%= translate("economy/profile:LOVER").substr(2) %>
<%= !user.lover ? translate("economy/profile:NO_LOVER") : bot.users.cache.get(user.lover).tag %> + class="description-text"><%= !userInfos.lover ? translate("economy/profile:NO_LOVER") : bot.users.cache.get(userInfos.lover).tag %>
@@ -86,7 +86,7 @@
<%= translate("economy/profile:LEVEL").substr(2) %> - <%= guild.members.find(u => u.id === user.id).level %> + <%= guild.members.find(u => u.id === userInfos.id).level %>
@@ -100,7 +100,7 @@
<%= translate("economy/profile:CASH").substr(2) %> / <%= translate("economy/profile:BANK").substr(2) %> - <%= guild.members.find(u => u.id === user.id).money %> / <%= guild.members.find(u => u.id === user.id).bankSold %> + <%= guild.members.find(u => u.id === userInfos.id).money %> / <%= guild.members.find(u => u.id === userInfos.id).bankSold %>
@@ -113,7 +113,7 @@
<%= translate("economy/profile:REPUTATION").substr(2) %> - <%= user.rep %> + <%= userInfos.rep %>
diff --git a/languages/ru-RU/economy/birthdate.json b/languages/ru-RU/economy/birthdate.json index cb3886ed..cce5dc2c 100644 --- a/languages/ru-RU/economy/birthdate.json +++ b/languages/ru-RU/economy/birthdate.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Установить дату рождения", - "USAGE": "{{prefix}}birthdate [дата]", + "USAGE": "{{prefix}}birthdate [ДД/ММ/ГГГГ]", "EXAMPLES": "{{prefix}}birthdate 01/01/2010", "MISSING_DATE": "Укажите дату в формате 20/11/2003", "INVALID_DATE": "Используйте данный формат: ДД/ММ/ГГГГ. Например, `1 января 2010` будет `01/01/2010`.",