diff --git a/commands/General/setafk.js b/commands/General/setafk.js index 69980e4e..7b074b5f 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -35,7 +35,7 @@ class Setafk extends Command { const m = await message.success("general/setafk:SUCCESS", { reason, - prefix: message.guild ? data.guild.prefix : "$" + prefix: message.guild ? data.guild.prefix : "" }); setTimeout(() => { diff --git a/dashboard/app.js b/dashboard/app.js index 5a82c22d..bcd44792 100644 --- a/dashboard/app.js +++ b/dashboard/app.js @@ -43,6 +43,7 @@ module.exports.load = async(client) => { if (req.user) { req.translate = req.client.translations.get(req.locale); req.printDate = (date) => req.client.printDate(date, null, req.locale); + req.convertTime = (time) => req.client.convertTime(time, "to", true, req.locale); }; next(); }) diff --git a/dashboard/routes/guild-manager.js b/dashboard/routes/guild-manager.js index 86306b0f..9c16aa58 100644 --- a/dashboard/routes/guild-manager.js +++ b/dashboard/routes/guild-manager.js @@ -16,12 +16,15 @@ router.get("/:serverID", CheckAuth, async(req, res) => { // Fetch guild informations const guildInfos = await utils.fetchGuild(guild.id, req.client, req.user.guilds); + const memberData = await req.client.findOrCreateMember({ id: req.userInfos.id, guildID: guild.id }); res.render("manager/guild", { guild: guildInfos, user: req.userInfos, + memberData: memberData, translate: req.translate, bot: req.client, + convertTime: req.convertTime, currentURL: `${req.client.config.dashboard.baseURL}/${req.originalUrl}` }); }); diff --git a/dashboard/routes/settings.js b/dashboard/routes/settings.js index 72eadda4..758a75c7 100644 --- a/dashboard/routes/settings.js +++ b/dashboard/routes/settings.js @@ -4,7 +4,7 @@ const express = require("express"), // Gets profile page router.get("/", CheckAuth, async function(req, res) { - res.render("settings", { + res.render("profile", { user: req.userInfos, translate: req.translate, printDate: req.printDate, @@ -25,7 +25,7 @@ router.post("/", CheckAuth, async function(req, res) { }; await user.save(); - res.redirect(303, "/settings"); + res.redirect(303, "/profile"); }); module.exports = router; diff --git a/dashboard/views/docs.ejs b/dashboard/views/docs.ejs index b3b74492..bb7194f7 100644 --- a/dashboard/views/docs.ejs +++ b/dashboard/views/docs.ejs @@ -193,13 +193,20 @@
+ ----------------------------------------------------------------------------------------- + JaBa v3.2.7 + ----------------------------------------------------------------------------------------- + Добавлено + - Некоторая информация о вашем профиле на сайте, на страницах серверов и в настройках. + (Скоро там будет больше всякой информации). + ----------------------------------------------------------------------------------------- JaBa v3.2.6 ----------------------------------------------------------------------------------------- Исправления - Команда goodbye снова работает. - Изменено + Изменения - Команда setafk и ответ бота автоматически удаляются через 10 секунд. - Новые карточки при входе и выходе пользователей (Я не дизайнер, не бейте :( ). @@ -208,7 +215,7 @@ ----------------------------------------------------------------------------------------- JaBa v3.2.5 ----------------------------------------------------------------------------------------- - Изменено + Изменения - Переписана команда loop. Теперь нужен аргумент song или queue для включения соответствующего режима повтора. Если не указать агрумент, то повтор отключится. diff --git a/dashboard/views/includes/sidebar.ejs b/dashboard/views/includes/sidebar.ejs index 78c02c39..9fad9369 100644 --- a/dashboard/views/includes/sidebar.ejs +++ b/dashboard/views/includes/sidebar.ejs @@ -40,11 +40,11 @@ - <% if(user.displayedGuilds) { %> + <% if (user.displayedGuilds) { %>diff --git a/dashboard/views/manager/guild.ejs b/dashboard/views/manager/guild.ejs index ee8e9dcf..48228b77 100644 --- a/dashboard/views/manager/guild.ejs +++ b/dashboard/views/manager/guild.ejs @@ -29,8 +29,9 @@