Skip to content

Commit

Permalink
Revert "feat: disableaoidb"
Browse files Browse the repository at this point in the history
  • Loading branch information
Leref authored Dec 3, 2023
1 parent ce5d991 commit e061123
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
12 changes: 8 additions & 4 deletions src/classes/AoiBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -131,10 +134,11 @@ class BaseClient extends Discord.Client {
});
}
}

/**
* @param {Record<string,string | number | object >} d
* @param table
*/
* @param {Record<string,string | number | object >} d
* @param table
*/
variables(d, table = this.db?.tables?.[0]) {
if (this.db === undefined) {
throw new TypeError(
Expand Down
1 change: 0 additions & 1 deletion src/functions/event/shard.js
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/handler/AoiStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ declare module "aoi.js" {
aoiLogs?: boolean;
aoiWarning?: boolean;
aoiAutoUpdate?: boolean;
disableAoiDB?: boolean;
suppressAllErrors?: boolean;
errorMessage?: Array<string>;
events?: Array<AllEvents>;
Expand Down

0 comments on commit e061123

Please sign in to comment.