Skip to content

Commit

Permalink
on startup timeout wont crash if db not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Leref committed Sep 27, 2023
1 parent d0c9ed4 commit 3da030e
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/handler/AoiStart.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Interpreter = require("../core/interpreter.js");

module.exports = async (client) => {
module.exports = async (client, options) => {

if (client.aoiOptions.aoiLogs !== false) {
await require("./AoiLogs.js")(client);
}
Expand All @@ -13,21 +14,24 @@ module.exports = async (client) => {
await require("./AoiAutoUpdate.js")(client);
}

await require("./Custom/timeout.js")(
{client, interpreter: Interpreter},
undefined,
undefined,
undefined,
true,
);
await require("./Custom/timeoutPulse.js")(
{client, interpreter: Interpreter},
undefined,
undefined,
undefined,
undefined,
true,
);
if (client.aoiOptions.database && client.aoiOptions.database) {
await require("./Custom/timeout.js")(
{ client, interpreter: Interpreter },
undefined,
undefined,
undefined,
true
);

await require("./Custom/timeoutPulse.js")(
{ client, interpreter: Interpreter },
undefined,
undefined,
undefined,
undefined,
true
);
}

if (client.cmd.loop.size) {
await require("./Custom/loop.js")(client);
Expand Down

0 comments on commit 3da030e

Please sign in to comment.