diff --git a/src/handlers/command/index.ts b/src/handlers/command/index.ts index 1816c8f..865c349 100644 --- a/src/handlers/command/index.ts +++ b/src/handlers/command/index.ts @@ -5,7 +5,7 @@ import logger from "../../middlewares/logger"; export const register = async (client: Client) => { // Get name of directories containing commands - const commandNames = await listDir("plugins/commands"); + const commandNames = await listDir("commands"); if (!commandNames) throw new Error("📦 No commands available"); const amountOfCommands = commandNames.length; @@ -13,10 +13,8 @@ export const register = async (client: Client) => { logger.info(`📦 Trying to load ${amountOfCommands} commands`); const importCommand = async (commandName: string) => { - // Import command from plugins/commands - const command: ICommand = await import( - `../../plugins/commands/${commandName}` - ); + // Import command from commands + const command: ICommand = await import(`../../commands/${commandName}`); if (!command) throw new Error(`📦 No command found while importing "${commandName}"`); if (!command.builder) diff --git a/src/handlers/event/index.ts b/src/handlers/event/index.ts index cf44860..4d0fabc 100644 --- a/src/handlers/event/index.ts +++ b/src/handlers/event/index.ts @@ -6,7 +6,7 @@ import logger from "../../middlewares/logger"; // Registers all available events export const register = async (client: Client) => { - const eventNames = await listDir("plugins/events"); + const eventNames = await listDir("events"); if (!eventNames) throw new Error("📦 No events available"); const amountOfEvents = eventNames.length; @@ -14,8 +14,8 @@ export const register = async (client: Client) => { logger.info(`📦 Trying to load ${amountOfEvents} events`); const importEvent = async (eventName: string) => { - // Import event from plugins/events - const event: IEvent = await import(`../../plugins/events/${eventName}`); + // Import event from events + const event: IEvent = await import(`../../events/${eventName}`); if (!event) throw new Error(`📦 No event found while importing "${eventName}"`); if (!event.options) @@ -76,7 +76,7 @@ export const register = async (client: Client) => { }); // for await (const eventName of eventNames) { - // const event: IEvent = await import(`../../plugins/events/${eventName}`); + // const event: IEvent = await import(`../../events/${eventName}`); // const eventExecutor = async (...args: Promise[]) => // event.execute(...args).catch(async (err) => { // logger.error(`${err}`);