load order fixes

This commit is contained in:
Cynthia Foxwell 2021-08-11 20:44:23 -06:00
parent 6e2cce0210
commit 2e94ce2e9d

View file

@ -8,7 +8,6 @@ const sqlite3 = require("sqlite3");
const config = require("../config.json");
const apikeys = require("../apikeys.json");
const Command = require("./lib/command.js");
const CommandDispatcher = require("./lib/commandDispatcher.js");
const events = require("./lib/events.js");
const timer = require("./lib/timer.js");
@ -48,6 +47,8 @@ global.hf = {
database,
};
const CommandDispatcher = require("./lib/commandDispatcher.js");
for (const file of fs.readdirSync(resolve(__dirname, "modules"))) {
require(resolve(__dirname, "modules", file));
logger.info("hf:modules", "Loaded module: '%s'", file);