Fixed sqlite, disabled reload

This commit is contained in:
Essem 2021-08-19 15:31:51 -05:00
parent ae2ebe0337
commit cb895900d5
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
2 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@ class ReloadCommand extends Command {
// quite possibly one of the hackiest commands in the bot
run() {
return new Promise((resolve) => {
if (this.message.author.id !== process.env.OWNER) resolve("Only the bot owner can reload commands!");
/*if (this.message.author.id !== process.env.OWNER) resolve("Only the bot owner can reload commands!");
if (this.args.length === 0) resolve("You need to provide a command to reload!");
this.ipc.broadcast("reload", this.args[0]);
this.ipc.register("reloadSuccess", () => {
@ -16,7 +16,8 @@ class ReloadCommand extends Command {
this.ipc.unregister("reloadSuccess");
this.ipc.unregister("reloadFail");
resolve(message);
});
});*/
resolve("This command is currently disabled until the ECMAScript module format supports unloading imported files.");
});
}

View File

@ -1,5 +1,5 @@
import collections from "../collections.js";
import logger from "../logger.js";
import * as collections from "../collections.js";
import * as logger from "../logger.js";
import sqlite3 from "better-sqlite3";
const connection = sqlite3(process.env.DB.replace("sqlite://", ""));