From e06112378ec49616aae098201a1279d6e213ef67 Mon Sep 17 00:00:00 2001 From: Leref <12578483+Leref@users.noreply.github.com> Date: Sun, 3 Dec 2023 01:15:42 -0500 Subject: [PATCH] Revert "feat: disableaoidb" --- src/classes/AoiBase.js | 12 ++++++++---- src/functions/event/shard.js | 1 - src/handler/AoiStart.js | 2 +- src/index.d.ts | 1 - 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/classes/AoiBase.js b/src/classes/AoiBase.js index 2cde4e8a9..6a24da47d 100644 --- a/src/classes/AoiBase.js +++ b/src/classes/AoiBase.js @@ -48,7 +48,10 @@ class BaseClient extends Discord.Client { this.variableManager = new VariableManager(this); - if (!options.disableAoiDB && (["default", "aoi.db"].includes(options?.database?.type) || !options?.database)) { + if ( + ["default", "aoi.db"].includes(options?.database?.type) || + !options?.database + ) { const dbData = options?.database; this.db = new Database( @@ -131,10 +134,11 @@ class BaseClient extends Discord.Client { }); } } + /** - * @param {Record} d - * @param table - */ + * @param {Record} d + * @param table + */ variables(d, table = this.db?.tables?.[0]) { if (this.db === undefined) { throw new TypeError( diff --git a/src/functions/event/shard.js b/src/functions/event/shard.js index 60681e465..0df7970d5 100644 --- a/src/functions/event/shard.js +++ b/src/functions/event/shard.js @@ -1,6 +1,5 @@ module.exports = async (d) => { const data = d.util.aoiFunc(d); - if (data.err) return d.error(data.err); const [option] = data.inside.splits; diff --git a/src/handler/AoiStart.js b/src/handler/AoiStart.js index 957b73916..e343fcb6d 100644 --- a/src/handler/AoiStart.js +++ b/src/handler/AoiStart.js @@ -13,7 +13,7 @@ module.exports = async (client, options) => { await require("./AoiAutoUpdate.js")(client); } - if (!client.aoiOptions.disableAoiDB && client.aoiOptions.database && client.aoiOptions.database) { + if (client.aoiOptions.database && client.aoiOptions.database) { await require("./Custom/timeout.js")( { client, interpreter: Interpreter }, undefined, diff --git a/src/index.d.ts b/src/index.d.ts index 2118343ba..9ef515dba 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -191,7 +191,6 @@ declare module "aoi.js" { aoiLogs?: boolean; aoiWarning?: boolean; aoiAutoUpdate?: boolean; - disableAoiDB?: boolean; suppressAllErrors?: boolean; errorMessage?: Array; events?: Array;