diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 15 | ||||
-rw-r--r-- | src/lib/extensions/discord.js/BushGuildMember.ts | 2 | ||||
-rw-r--r-- | src/lib/extensions/global.d.ts | 3 |
3 files changed, 3 insertions, 17 deletions
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; } |