Skip to content

Commit

Permalink
perf: تسريع عملية البحث ملفات المشروع
Browse files Browse the repository at this point in the history
غربلة الملفات قبل تغيير قيمة العناصر في المصفوفة يقلل من عدد البيانات المطلوب تعديلها في دالة map
  • Loading branch information
Assayyaad committed Sep 4, 2024
1 parent e323b10 commit 01554eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/class/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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[]} */
Expand Down

0 comments on commit 01554eb

Please sign in to comment.