galactic-bot/util/archive/old storage/Provider.js

22 lines
516 B
JavaScript
Raw Normal View History

2020-08-08 21:00:49 +02:00
class Provider {
constructor(manager, opts) {
if(!opts.config) throw new Error('No config file provided!');
this.config = opts.config[opts.name];
if(this.config && (!this.config.database || !this.config.host)) throw new Error('Invalid config file provided!' + JSON.stringify(this.config));
this.manager = manager;
this.name = opts.name;
this.connection = null;
this.db = null;
this._initialized = false;
}
}
module.exports = Provider;