From e26413dde461729694c36a92e01970df15eb68a5 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 9 Jan 2022 09:31:55 -0500 Subject: this is a really bad idea --- src/lib/extensions/discord-akairo/BushClientUtil.ts | 4 ++-- src/lib/models/Shared.ts | 10 +++++++++- src/lib/utils/BushCache.ts | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 3e066c8..12becd3 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -476,7 +476,7 @@ export class BushClientUtil extends ClientUtil { * @param key The key of the element in the shared cache to update. * @param value The value to add/remove from the array. */ - public async insertOrRemoveFromShared>( + public async insertOrRemoveFromShared>( action: 'add' | 'remove', key: K, value: typeof client['cache']['shared'][K][0] @@ -510,7 +510,7 @@ export class BushClientUtil extends ClientUtil { * @param key The key in the shared cache to update. * @param value The value to set the key to. */ - public async setShared>( + public async setShared>( key: K, value: typeof client['cache']['shared'][K] ): Promise { diff --git a/src/lib/models/Shared.ts b/src/lib/models/Shared.ts index a240ef9..acb5c1e 100644 --- a/src/lib/models/Shared.ts +++ b/src/lib/models/Shared.ts @@ -11,6 +11,7 @@ export interface SharedModel { badLinksSecret: string[]; badLinks: string[]; badWords: BadWords; + autoBanCode: string | null; } export interface SharedModelCreationAttributes { @@ -20,6 +21,7 @@ export interface SharedModelCreationAttributes { badLinksSecret?: string[]; badLinks?: string[]; badWords?: BadWords; + autoBanCode?: string; } export class Shared extends BaseModel implements SharedModel { @@ -53,6 +55,11 @@ export class Shared extends BaseModel { public badLinksSecret: string[] = []; public badLinks: string[] = []; public badWords: BadWords = {}; + public autoBanCode: string | null = null; } export class GuildCache extends Collection {} -- cgit