diff --git a/dashboard/app.js b/dashboard/app.js index c42c6641..8814c0ea 100644 --- a/dashboard/app.js +++ b/dashboard/app.js @@ -39,7 +39,7 @@ module.exports.load = async(client) => { .use(async function(req, res, next) { req.user = req.session.user; req.client = client; - req.locale = req.user ? (req.user.locale === "ru" ? "ru-RU" : "en-US") : "en-US"; + req.locale = req.user ? (req.user.locale === "ru" ? "ru-RU" : "uk-UA") : "ru-RU"; if (req.user && req.url !== "/") req.userInfos = await utils.fetchUser(req.user, req.client); if (req.user) { req.translate = req.client.translations.get(req.locale); diff --git a/dashboard/utils.js b/dashboard/utils.js index 8497c5d1..c531b84b 100644 --- a/dashboard/utils.js +++ b/dashboard/utils.js @@ -28,14 +28,14 @@ async function fetchUser(userData, client, query) { const userDb = await client.findOrCreateUser({ id: user.id }, true); - const guildData = await client.guilds.fetch(userData.guilds.filter(g => g.displayed)[0].id); - const userPresence = guildData.members.cache.get(user.id).presence; + // const guildData = await client.guilds.fetch(userData.displayedGuilds[0].id); + // const userPresence = guildData.members.cache.get(user.id).presence; const userInfos = { ...user.toJSON(), ...userDb, - ...userData, - ...userPresence + ...userData + // ...userPresence }; return userInfos; diff --git a/dashboard/views/includes/sidebar.ejs b/dashboard/views/includes/sidebar.ejs index aa59b2d5..7176d85f 100644 --- a/dashboard/views/includes/sidebar.ejs +++ b/dashboard/views/includes/sidebar.ejs @@ -9,9 +9,9 @@

<%= user.username %>

- "> - <%= translate("common:STATUS_" + user.status.toUpperCase()) %> - +