diff --git a/src/Client.ts b/src/Client.ts index 350e074..4feadf9 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -377,7 +377,7 @@ export class Client extends TypedEventEmitter { const commands = await promisify(glob)(normalize(path + "/**/*.{ts,js}")); for (const commandPath of commands) { try { - let command: MaybeCommand = await require(commandPath); + let command: MaybeCommand = await import(commandPath); if ('default' in command) command = command.default; if (command.constructor.name === 'Object') command = Object.values(command)[0];