diff --git a/package.json b/package.json index cf20c19..67e195d 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,8 @@ { "name": "linkup-bot-lib", - "version": "1.2.1", + "version": "1.2.2", "main": "lib/Client.js", "types": "lib/*.ts", - "type": "module", "scripts": { "prepublishOnly": "typedoc", "build": "typedoc" diff --git a/src/Client.ts b/src/Client.ts index 4feadf9..350e074 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 import(commandPath); + let command: MaybeCommand = await require(commandPath); if ('default' in command) command = command.default; if (command.constructor.name === 'Object') command = Object.values(command)[0];