From f59f6ef4d71ca3afb105f1e54543d048955f9068 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 17 Dec 2022 13:49:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A7=D0=B8=D1=81=D1=82=D0=B8=D0=BC=20=D1=87?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D0=B8=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/JaBa.js | 14 +++++++------- commands/Administration/selectroles.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/JaBa.js b/base/JaBa.js index 2ba018bb..415c42a7 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -112,13 +112,12 @@ class JaBa extends Client { * @returns */ async loadCommands(dir) { - const filePath = path.join(__dirname, dir); - let folders = await fs.readdir(filePath); - folders = folders - .map(file => path.join(filePath, file)) - .filter(async path => { path = await fs.lstat(path); path.isDirectory(); }); + const rest = new REST().setToken(this.config.token), + filePath = path.join(__dirname, dir), + folders = (await fs.readdir(filePath)) + .map(file => path.join(filePath, file)) + .filter(async path => (await fs.lstat(path)).isDirectory()); - const rest = new REST().setToken(this.config.token); const commands = []; for (let index = 0; index < folders.length; index++) { const folder = folders[index]; @@ -234,6 +233,7 @@ class JaBa extends Client { /** * Get default language + * @returns {String} Default bot's language */ get defaultLanguage() { return this.languages.find(language => language.default).name; @@ -253,7 +253,7 @@ class JaBa extends Client { } /** - * Returns beautified date + * Beautify date * @param {Date} date Date * @param {String | null} format Format for moment * @param {String} locale Language diff --git a/commands/Administration/selectroles.js b/commands/Administration/selectroles.js index 76d43dff..d93f32af 100644 --- a/commands/Administration/selectroles.js +++ b/commands/Administration/selectroles.js @@ -58,7 +58,7 @@ class Selectroles extends BaseCommand { } interaction.reply({ - content: interaction.translate("administration/selectroles:ROLES_UPDATED", null, { ephemeral: true }), + content: interaction.translate("administration/selectroles:ROLES_UPDATED"), ephemeral: true, }); }