zumito-framework 1.1.17 → 1.1.18
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.
package/dist/ZumitoFramework.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZumitoFramework = void 0;
|
|
4
4
|
const Module_1 = require("./types/Module");
|
|
5
5
|
const ApiResponse_1 = require("./definitions/ApiResponse");
|
|
6
|
+
const baseModule_1 = require("./baseModule");
|
|
6
7
|
const express = require("express");
|
|
7
8
|
const fs = require('fs');
|
|
8
9
|
const path = require('path');
|
|
@@ -106,7 +107,7 @@ class ZumitoFramework {
|
|
|
106
107
|
}
|
|
107
108
|
else
|
|
108
109
|
return;
|
|
109
|
-
this.registerModule(__dirname, 'baseModule',
|
|
110
|
+
this.registerModule(__dirname, 'baseModule', baseModule_1.baseModule);
|
|
110
111
|
fs.readdirSync(modulesFolder).forEach(file => {
|
|
111
112
|
this.registerModule(modulesFolder, file);
|
|
112
113
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.baseModule = void 0;
|
|
4
|
+
const Module_1 = require("../types/Module");
|
|
5
|
+
const interactionCreate_1 = require("./events/discord/interactionCreate");
|
|
6
|
+
const messageCreate_1 = require("./events/discord/messageCreate");
|
|
7
|
+
class baseModule extends Module_1.Module {
|
|
8
|
+
constructor(modulePath, framework) {
|
|
9
|
+
super(modulePath, framework);
|
|
10
|
+
}
|
|
11
|
+
registerEvents() {
|
|
12
|
+
this.events.set('interactionCreate', new interactionCreate_1.InteractionCreate());
|
|
13
|
+
this.events.set('messageCreate', new messageCreate_1.MessageCreate());
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.baseModule = baseModule;
|