fix API import errors when missing files
This commit is contained in:
parent
1e23fa5bc8
commit
23d6ed8212
@ -41,8 +41,9 @@ class Manager extends EventEmitter {
|
||||
await this.shardManager.spawn();
|
||||
// G:\Documents\My programs\GBot\New GBot\api\index.cjs
|
||||
this.info('Shards done, booting up API...');
|
||||
const { default: APIManager } = await import('./api/index.js').catch((err) => this.error(`Import of API Manager failed.\n${err.stack}`));
|
||||
if (APIManager) {
|
||||
const API = await import('./api/index.js').catch((err) => this.error(`Import of API Manager failed.\n${err.stack}`));
|
||||
if (API) {
|
||||
const { default: APIManager } = API;
|
||||
this.apiManager = new APIManager(this);
|
||||
await this.apiManager.init();
|
||||
this.info('API done. Manager built.');
|
||||
@ -91,6 +92,7 @@ class Manager extends EventEmitter {
|
||||
const { type } = message;
|
||||
switch (type) {
|
||||
case 'statsQuery':
|
||||
break;
|
||||
// TODO: Figure out best strategy for stats querying - push/pull, prometheus, simple polling
|
||||
//return this.aggregateStatistics();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user