diff options
Diffstat (limited to 'dist/util/Config.js')
-rw-r--r-- | dist/util/Config.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dist/util/Config.js b/dist/util/Config.js new file mode 100644 index 00000000..948f09d6 --- /dev/null +++ b/dist/util/Config.js @@ -0,0 +1,28 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefaultOptions = void 0; +require("missing-native-js-functions"); +const Database_1 = __importDefault(require("./Database")); +var Config; +exports.default = { + init: async function init(opts = exports.DefaultOptions) { + Config = Database_1.default.data.config({}).cache(); + await Config.init(); + await Config.set(opts.merge(Config.cache || {})); + }, + getAll: function get() { + return Config.get(); + }, + setAll: function set(val) { + return Config.set(val); + }, +}; +exports.DefaultOptions = { + api: {}, + gateway: {}, + voice: {}, +}; +//# sourceMappingURL=Config.js.map \ No newline at end of file |