zumito-framework 1.16.0 → 1.17.0

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.
@@ -170,6 +170,10 @@ export class ZumitoFramework {
170
170
  if (this.settings.statusOptions) {
171
171
  this.statusManager = new StatusManager(this, this.settings.statusOptions);
172
172
  }
173
+ this.eventEmitter.emit('ready');
174
+ for (const module of this.modules.getAll().values()) {
175
+ await module.onAllReady();
176
+ }
173
177
  }
174
178
  async initializeDatabase() {
175
179
  const mongoUri = this.settings?.mongoQueryString || process.env.MONGO_URI;
@@ -20,6 +20,7 @@ export declare abstract class Module {
20
20
  protected errorHandler: ErrorHandler;
21
21
  constructor(path: any, parameters?: ModuleParameters);
22
22
  initialize(): Promise<void>;
23
+ onAllReady(): Promise<void>;
23
24
  registerCommands(): Promise<void>;
24
25
  getCommands(): Map<string, Command>;
25
26
  registerEvents(): Promise<void>;
@@ -28,6 +28,8 @@ export class Module {
28
28
  await this.registerTranslations();
29
29
  await this.registerRoutes();
30
30
  }
31
+ async onAllReady() {
32
+ }
31
33
  async registerCommands() {
32
34
  const commandsFolder = path.join(this.path, 'commands');
33
35
  if (fs.existsSync(commandsFolder)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",