aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json1
-rw-r--r--src/bot.ts2
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts15
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts2
-rw-r--r--src/lib/extensions/global.d.ts3
-rw-r--r--yarn.lock19
6 files changed, 4 insertions, 38 deletions
diff --git a/package.json b/package.json
index 22fb91b..6d0eb64 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,6 @@
"fuse.js": "^6.4.6",
"got": "^11.8.2",
"humanize-duration": "^3.27.0",
- "json5": "^2.2.0",
"lodash": "^4.17.21",
"mathjs": "^9.5.0",
"module-alias": "^2.2.2",
diff --git a/src/bot.ts b/src/bot.ts
index 1354c31..daa6382 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -3,5 +3,5 @@ import 'source-map-support/register';
import config from './config/options';
import { BushClient } from './lib';
-BushClient.preStart();
+BushClient.init();
void new BushClient(config).start();
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index a053f00..6133dba 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -17,8 +17,6 @@ import {
} from 'discord.js';
//@ts-ignore: no typings
import eventsIntercept from 'events-intercept';
-import JSON5 from 'json5';
-import 'json5/lib/register';
import path from 'path';
import readline from 'readline';
import { Sequelize } from 'sequelize';
@@ -111,9 +109,7 @@ const rl = readline.createInterface({
type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Ready> {
- public static preStart(): void {
- global.JSON5 = JSON5;
-
+ public static init(): void {
Structures.extend('GuildEmoji', () => BushGuildEmoji);
Structures.extend('DMChannel', () => BushDMChannel);
Structures.extend('TextChannel', () => BushTextChannel);
@@ -143,14 +139,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
public declare users: BushUserManager;
public customReady = false;
- public stats: {
- cpu: number | undefined;
- commandsUsed: bigint;
- } = {
- cpu: undefined,
- commandsUsed: 0n
- };
-
+ public stats: { cpu: number | undefined; commandsUsed: bigint } = { cpu: undefined, commandsUsed: 0n };
public config: Config;
public listenerHandler: BushListenerHandler;
public inhibitorHandler: BushInhibitorHandler;
diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts
index 77d03b1..34054c8 100644
--- a/src/lib/extensions/discord.js/BushGuildMember.ts
+++ b/src/lib/extensions/discord.js/BushGuildMember.ts
@@ -76,7 +76,7 @@ type BanResponse = PunishmentResponse | 'missing permissions' | 'error creating
export type PartialBushGuildMember = Partialize<
BushGuildMember,
'joinedAt' | 'joinedTimestamp',
- 'user' | 'warn' | 'addRole' | 'removeRole' | 'mute' | 'unmute' | 'bushKick' | 'bushBan' | 'isOwner' | 'isSuperUser'
+ 'warn' | 'addRole' | 'removeRole' | 'mute' | 'unmute' | 'bushKick' | 'bushBan' | 'isOwner' | 'isSuperUser'
>;
export class BushGuildMember extends GuildMember {
diff --git a/src/lib/extensions/global.d.ts b/src/lib/extensions/global.d.ts
index 6fd9d58..e10db0a 100644
--- a/src/lib/extensions/global.d.ts
+++ b/src/lib/extensions/global.d.ts
@@ -1,10 +1,7 @@
/* eslint-disable no-var */
-import { parse, stringify } from 'json5';
import { BushClient } from './discord-akairo/BushClient';
import { BushClientUtil } from './discord-akairo/BushClientUtil';
-type JSON5 = { parse: typeof parse; stringify: typeof stringify };
declare global {
var client: BushClient;
var util: BushClientUtil;
- var JSON5: JSON5;
}
diff --git a/yarn.lock b/yarn.lock
index d90611f..789b789 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -741,7 +741,6 @@ __metadata:
fuse.js: ^6.4.6
got: ^11.8.2
humanize-duration: ^3.27.0
- json5: ^2.2.0
lodash: ^4.17.21
mathjs: ^9.5.0
module-alias: ^2.2.2
@@ -1877,17 +1876,6 @@ __metadata:
languageName: node
linkType: hard
-"json5@npm:^2.2.0":
- version: 2.2.0
- resolution: "json5@npm:2.2.0"
- dependencies:
- minimist: ^1.2.5
- bin:
- json5: lib/cli.js
- checksum: e88fc5274bb58fc99547baa777886b069d2dd96d9cfc4490b305fd16d711dabd5979e35a4f90873cefbeb552e216b041a304fe56702bedba76e19bc7845f208d
- languageName: node
- linkType: hard
-
"keyv@npm:^4.0.0":
version: 4.0.3
resolution: "keyv@npm:4.0.3"
@@ -2073,13 +2061,6 @@ __metadata:
languageName: node
linkType: hard
-"minimist@npm:^1.2.5":
- version: 1.2.5
- resolution: "minimist@npm:1.2.5"
- checksum: 86706ce5b36c16bfc35c5fe3dbb01d5acdc9a22f2b6cc810b6680656a1d2c0e44a0159c9a3ba51fb072bb5c203e49e10b51dcd0eec39c481f4c42086719bae52
- languageName: node
- linkType: hard
-
"minipass-collect@npm:^1.0.2":
version: 1.0.2
resolution: "minipass-collect@npm:1.0.2"