This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-09 12:25:00 +00:00
|
|
|
const fs = require("fs");
|
2020-06-22 09:54:01 +00:00
|
|
|
const low = require("lowdb");
|
|
|
|
const FileSync = require("lowdb/adapters/FileSync");
|
|
|
|
const Memory = require("lowdb/adapters/Memory");
|
|
|
|
|
2020-09-09 12:25:00 +00:00
|
|
|
if (!fs.existsSync("state")) fs.mkdirSync("state");
|
|
|
|
|
2020-09-10 10:15:54 +00:00
|
|
|
const adapter = new FileSync("state/state.json");
|
2020-06-22 09:54:01 +00:00
|
|
|
const db = low(adapter);
|
|
|
|
|
2020-09-10 10:15:54 +00:00
|
|
|
db.defaults({ disabled: false, critical: [], verbose: [] }).write();
|
2020-06-22 09:54:01 +00:00
|
|
|
|
|
|
|
module.exports = db;
|