forked from Galactic/galactic-bot
19 lines
451 B
JavaScript
19 lines
451 B
JavaScript
class Provider {
|
|
|
|
constructor(manager, config, name) {
|
|
|
|
if(!config) throw new Error('No config file provided!');
|
|
this.config = config[name];
|
|
if(config && (!this.config.database || !this.config.host)) throw new Error('Invalid config file provided!' + JSON.stringify(this.config));
|
|
|
|
this.manager = manager;
|
|
this.db;
|
|
this.loaded = false;
|
|
this.name = name;
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = Provider; |