mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
Фиксы
This commit is contained in:
parent
3ffabbf6a1
commit
25983d2c27
3 changed files with 13 additions and 12 deletions
|
@ -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,
|
||||
|
|
|
@ -27,19 +27,19 @@
|
|||
<div class="box box-widget widget-user">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-red">
|
||||
<h3 class="widget-user-username"><%= user.tag %></h3>
|
||||
<h3 class="widget-user-username"><%= userInfos.tag %></h3>
|
||||
<i><%= bot.guilds.cache.get(guild.id).name %></i>
|
||||
<p> <i>ID: <%= guild.id %></i> </p>
|
||||
</div>
|
||||
<div class="widget-user-image">
|
||||
<img class="img-circle" src="<%= user.displayAvatarURL %>" alt="User Avatar">
|
||||
<img class="img-circle" src="<%= userInfos.displayAvatarURL %>" alt="User Avatar">
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="description-block">
|
||||
<span
|
||||
class="description-text"><%= user.bio || translate("economy/profile:NO_BIO") %></span>
|
||||
class="description-text"><%= userInfos.bio || translate("economy/profile:NO_BIO") %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 border-right">
|
||||
|
@ -47,7 +47,7 @@
|
|||
<h5 class="description-header">
|
||||
<%= translate("economy/profile:BIRTHDATE").substr(2) %></h5>
|
||||
<span
|
||||
class="description-text"><%= user.birthdate ? printDate(new Date(user.birthdate)) : translate("economy/profile:NO_BIRTHDATE") %></span>
|
||||
class="description-text"><%= userInfos.birthdate ? printDate(new Date(userInfos.birthdate)) : translate("economy/profile:NO_BIRTHDATE") %></span>
|
||||
</div>
|
||||
<!-- /.description-block -->
|
||||
</div>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<div class="description-block">
|
||||
<h5 class="description-header"><%= translate("economy/profile:REGISTERED").substr(2) %></h5>
|
||||
<span
|
||||
class="description-text"><%= printDate(new Date(user.registeredAt)) %></span>
|
||||
class="description-text"><%= printDate(new Date(userInfos.registeredAt)) %></span>
|
||||
</div>
|
||||
<!-- /.description-block -->
|
||||
</div>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<h5 class="description-header">
|
||||
<%= translate("economy/profile:LOVER").substr(2) %></h5>
|
||||
<span
|
||||
class="description-text"><%= !user.lover ? translate("economy/profile:NO_LOVER") : bot.users.cache.get(user.lover).tag %></span>
|
||||
class="description-text"><%= !userInfos.lover ? translate("economy/profile:NO_LOVER") : bot.users.cache.get(userInfos.lover).tag %></span>
|
||||
</div>
|
||||
<!-- /.description-block -->
|
||||
</div>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<div class="info-box-content">
|
||||
<span
|
||||
class="info-box-text"><%= translate("economy/profile:LEVEL").substr(2) %></span>
|
||||
<span class="info-box-number"><%= guild.members.find(u => u.id === user.id).level %></span>
|
||||
<span class="info-box-number"><%= guild.members.find(u => u.id === userInfos.id).level %></span>
|
||||
</div>
|
||||
<!-- /.info-box-content -->
|
||||
</div>
|
||||
|
@ -100,7 +100,7 @@
|
|||
<div class="info-box-content">
|
||||
<span
|
||||
class="info-box-text"><%= translate("economy/profile:CASH").substr(2) %> / <%= translate("economy/profile:BANK").substr(2) %></span>
|
||||
<span class="info-box-number"><%= guild.members.find(u => u.id === user.id).money %> / <%= guild.members.find(u => u.id === user.id).bankSold %></span>
|
||||
<span class="info-box-number"><%= guild.members.find(u => u.id === userInfos.id).money %> / <%= guild.members.find(u => u.id === userInfos.id).bankSold %></span>
|
||||
</div>
|
||||
<!-- /.info-box-content -->
|
||||
</div>
|
||||
|
@ -113,7 +113,7 @@
|
|||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text"><%= translate("economy/profile:REPUTATION").substr(2) %></span>
|
||||
<span class="info-box-number"><%= user.rep %></span>
|
||||
<span class="info-box-number"><%= userInfos.rep %></span>
|
||||
</div>
|
||||
<!-- /.info-box-content -->
|
||||
</div>
|
||||
|
|
|
@ -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`.",
|
||||
|
|
Loading…
Reference in a new issue