summary refs log tree commit diff
path: root/dist/util/Config.js
blob: 5c41d39a3fab656a928a94dd5d5c1f7851af674c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 = await 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