From 2b56517dd3f38bc4301d12f17d041efa18cd4e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20=C5=98epka?= Date: Fri, 16 Feb 2024 09:54:34 +0100 Subject: [PATCH] fix srvdata fucky --- core/commands/moderation/lang.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/commands/moderation/lang.js b/core/commands/moderation/lang.js index 318f28d9..1867ccaf 100644 --- a/core/commands/moderation/lang.js +++ b/core/commands/moderation/lang.js @@ -21,6 +21,7 @@ const init = async (msg, args) => { const P = { lngs: msg.lang }; const language = args[0]; + const serverData = await DB.servers.get(msg.guild.id); if (!PLX.modPass(msg.member, "kickMembers", serverData)) return msg.channel.send($t("responses.errors.insuperms", P)); const langOptions = shuffle(Languages.i18n).map(lang => { @@ -45,7 +46,6 @@ const init = async (msg, args) => { if ( !langOptions.filter(x=>x.default).length ) langOptions.find(x=>x.value==='en').default = true; if (language === "refresh") { - const serverData = await DB.servers.get(msg.guild.id); msg.guild.LANG = serverData.modules.LANGUAGE; return msg.addReaction(_emoji("yep").reaction); }