3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Small cleanup

This commit is contained in:
Dragory 2019-01-15 01:07:02 +02:00
parent 7c39454a9d
commit ee3a64cafa

View file

@ -1,10 +1,10 @@
import path from "path";
import yaml from "js-yaml";
import _fs from "fs";
const fs = _fs.promises;
import fs from "fs";
const fsp = fs.promises;
import {Knub, logger, PluginError} from "knub";
import { Knub, logger, PluginError } from "knub";
import { SimpleError } from "./SimpleError";
require("dotenv").config();
@ -125,12 +125,12 @@ connect().then(async conn => {
const configPath = path.join("config", configFile);
try {
await fs.access(configPath);
await fsp.access(configPath);
} catch (e) {
return {};
}
const yamlString = await fs.readFile(configPath, { encoding: "utf8" });
const yamlString = await fsp.readFile(configPath, { encoding: "utf8" });
return yaml.safeLoad(yamlString);
},