From e7331498f48d84a354e43f0b96a18a32163577b7 Mon Sep 17 00:00:00 2001 From: ytshih Date: Sun, 13 Oct 2024 14:59:46 +0000 Subject: [PATCH] Fix: change readdir to async --- init/load-commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/load-commands.ts b/init/load-commands.ts index 1714ecf..3a29f5a 100644 --- a/init/load-commands.ts +++ b/init/load-commands.ts @@ -6,7 +6,7 @@ import { logger } from '../logger'; export async function loadCommands(client: ExtendedClient): Promise>{ const foldersPath = path.join(__dirname, '../commands'); - const commandFolders = readdirSync(foldersPath); + const commandFolders = await readdir(foldersPath); const commands: Array = []; for(const folder of commandFolders){ const commandsPath = path.join(foldersPath, folder);