zumito-framework 1.15.0 → 1.15.1

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.
@@ -42,7 +42,11 @@ export class ModuleManager {
42
42
  return Module;
43
43
  }
44
44
  const module = await import('file://' + file);
45
- return Object.values(module)[0];
45
+ const exports = Object.values(module);
46
+ const moduleClass = exports.find((candidate) => {
47
+ return Object.getPrototypeOf(candidate).name === 'Module';
48
+ });
49
+ return moduleClass || exports[0];
46
50
  }
47
51
  registerModule(module) {
48
52
  // Register module commands
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",