From 01554eb63a851facbde5f781ab8c920943ff386d Mon Sep 17 00:00:00 2001 From: Assayyaad Date: Wed, 4 Sep 2024 19:07:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=D8=AA=D8=B3=D8=B1=D9=8A=D8=B9=20=D8=B9?= =?UTF-8?q?=D9=85=D9=84=D9=8A=D8=A9=20=D8=A7=D9=84=D8=A8=D8=AD=D8=AB=20?= =?UTF-8?q?=D9=85=D9=84=D9=81=D8=A7=D8=AA=20=D8=A7=D9=84=D9=85=D8=B4=D8=B1?= =?UTF-8?q?=D9=88=D8=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit غربلة الملفات قبل تغيير قيمة العناصر في المصفوفة يقلل من عدد البيانات المطلوب تعديلها في دالة map --- src/class/bot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class/bot.js b/src/class/bot.js index e91412d..4103193 100644 --- a/src/class/bot.js +++ b/src/class/bot.js @@ -120,8 +120,8 @@ export class Bot extends Client { */ async registerAllModules() { const paths = findPaths() - .map((fp) => fp.fullPath) - .filter((fp) => fp.includes('command') || fp.includes('event')) + .filter(({ fullPath }) => fullPath.includes('command') || fullPath.includes('event')) + .map(({ fullPath }) => fullPath) if (paths.length === 0) return /** @type {SuccessRecord[]} */