aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils/BushCache.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-08 20:08:16 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-08 20:08:16 -0500
commite0531157a745ac6178d55cc159b5932fa36ff20f (patch)
treea8de340d0c48269619e9bfde536932eb08556593 /src/lib/utils/BushCache.ts
parent0e160ae77477f0986a02746e84158329299f438f (diff)
downloadtanzanite-e0531157a745ac6178d55cc159b5932fa36ff20f.tar.gz
tanzanite-e0531157a745ac6178d55cc159b5932fa36ff20f.tar.bz2
tanzanite-e0531157a745ac6178d55cc159b5932fa36ff20f.zip
database migrations - use jsonb over text + JSON.parse, refactor bad word & automod - store word in shared db
closes: #53
Diffstat (limited to 'src/lib/utils/BushCache.ts')
-rw-r--r--src/lib/utils/BushCache.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/utils/BushCache.ts b/src/lib/utils/BushCache.ts
index 5654495..1f50fba 100644
--- a/src/lib/utils/BushCache.ts
+++ b/src/lib/utils/BushCache.ts
@@ -1,4 +1,4 @@
-import { type Guild } from '#lib';
+import { BadWords, GlobalModel, SharedModel, type Guild } from '#lib';
import { Collection, type Snowflake } from 'discord.js';
export class BushCache {
@@ -7,16 +7,19 @@ export class BushCache {
public guilds = new GuildCache();
}
-export class GlobalCache {
+export class GlobalCache implements Omit<GlobalModel, 'environment'> {
public disabledCommands: string[] = [];
public blacklistedChannels: Snowflake[] = [];
public blacklistedGuilds: Snowflake[] = [];
public blacklistedUsers: Snowflake[] = [];
}
-export class SharedCache {
+export class SharedCache implements Omit<SharedModel, 'primaryKey'> {
public superUsers: Snowflake[] = [];
+ public privilegedUsers: Snowflake[] = [];
+ public badLinksSecret: string[] = [];
public badLinks: string[] = [];
+ public badWords: BadWords = {};
}
export class GuildCache extends Collection<Snowflake, Guild> {}