diff --git a/src/managers/command/index.ts b/src/managers/command/index.ts index 10e6184..1816c8f 100644 --- a/src/managers/command/index.ts +++ b/src/managers/command/index.ts @@ -34,7 +34,7 @@ export const register = async (client: Client) => { }; // Send log message when it's done loading commands - const doneImporting = async () => { + const doneImporting = () => { if (importedCommandAmount !== amountOfCommands) { return logger.warn( `📦 Failed importing ${ @@ -48,13 +48,9 @@ export const register = async (client: Client) => { // Start importing commands commandNames.forEach(async (commandName: string, index: number) => { - await importCommand(commandName) - .then(async () => { - logger.debug(`📦 Imported the "${commandName}" command`); - }) - .catch(async (err) => { - logger.error(err); - }); + await importCommand(commandName).then(() => { + logger.debug(`📦 Imported the "${commandName}" command`); + }); // If done importing if (index + 1 === amountOfCommands) { diff --git a/src/managers/event/index.ts b/src/managers/event/index.ts index 3834687..cf44860 100644 --- a/src/managers/event/index.ts +++ b/src/managers/event/index.ts @@ -29,7 +29,7 @@ export const register = async (client: Client) => { // Register event const eventExecutor = async (...args: Promise[]) => { - await event.execute(...args).catch(async (err) => { + await event.execute(...args).catch((err) => { logger.error(`${err}`); }); }; @@ -52,7 +52,7 @@ export const register = async (client: Client) => { }; // Send log message when it's done loading events - const doneImporting = async () => { + const doneImporting = () => { if (importedEventAmount !== amountOfEvents) { return logger.warn( `📦 Failed importing ${ @@ -65,7 +65,7 @@ export const register = async (client: Client) => { }; eventNames.forEach(async (eventName: string, index: number) => { - await importEvent(eventName).then(async () => { + await importEvent(eventName).then(() => { logger.debug(`📦 Imported the "${eventName}" event`); });