Encrypt message data at rest

This commit is contained in:
Dragory 2020-09-16 22:32:43 +03:00
parent 3f3d6af4ed
commit baa3a5640e
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
10 changed files with 121 additions and 3 deletions

View file

@ -1,3 +1,5 @@
import "./loadEnv";
import path from "path";
import yaml from "js-yaml";
@ -25,7 +27,11 @@ import { PluginLoadError } from "knub/dist/plugins/PluginLoadError";
const fsp = fs.promises;
require("dotenv").config({ path: path.resolve(process.cwd(), "bot.env") });
if (!process.env.KEY) {
// tslint:disable-next-line:no-console
console.error("Project root .env with KEY is required!");
process.exit(1);
}
declare global {
// This is here so TypeScript doesn't give an error when importing twemoji