zumito-framework 1.23.1 → 1.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -326,7 +326,7 @@ export class ZumitoFramework {
326
326
  }
327
327
  }
328
328
  moduleEntries.push({
329
- rootPath: path.join(__dirname, 'modules', 'core'),
329
+ rootPath: path.join(__dirname, 'modules', 'core', 'baseModule'),
330
330
  name: 'baseModule',
331
331
  });
332
332
  if (fs.existsSync(`${process.cwd()}/node_modules/.zumitoBundles`)) {
@@ -92,7 +92,9 @@ export class Module {
92
92
  client: this.framework.client,
93
93
  };
94
94
  args.forEach((arg) => {
95
- finalArgs[arg.constructor.name.toLowerCase()] = arg;
95
+ if (arg && arg.constructor) {
96
+ finalArgs[arg.constructor.name.toLowerCase()] = arg;
97
+ }
96
98
  });
97
99
  const interaction = args.find((arg) => arg instanceof StringSelectMenuInteraction ||
98
100
  arg instanceof CommandInteraction ||
@@ -0,0 +1,4 @@
1
+ import { Module } from '../../../definitions/Module.js';
2
+ export declare class BaseModule extends Module {
3
+ initialize(): Promise<void>;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { Module } from '../../../definitions/Module.js';
2
+ export class BaseModule extends Module {
3
+ async initialize() {
4
+ await super.initialize();
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.23.1",
3
+ "version": "1.23.2",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",