galactic-bot/Manager.js
2020-04-08 08:27:34 -06:00

32 lines
551 B
JavaScript

const { EventEmitter } = require('events');
const options = require('./options.json');
class Manager extends EventEmitter {
constructor(options) {
this.registry = new Registry(this);
this.storageManager = new StorageManager(this, options.storage)
.initialize();
this.logger = new Logger(this);
this._built = false;
}
async build() {
await this.registry.loadComponents('components/commands/', Command);
this._built = true;
}
}
module.exports = Manager;