aboutsummaryrefslogtreecommitdiff
path: root/lib/common/BotCache.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 21:51:17 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 21:51:17 -0400
commit14eb0e617b084080c4cffc5b781b311c65c5f928 (patch)
tree9aaf1734c1e739814a913afeda40c56b0f84df61 /lib/common/BotCache.ts
parent03b26d5f00422f3aaddce3db2186765863b1eca0 (diff)
downloadtanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.gz
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.bz2
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.zip
rebrand v3
Diffstat (limited to 'lib/common/BotCache.ts')
-rw-r--r--lib/common/BotCache.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/common/BotCache.ts b/lib/common/BotCache.ts
new file mode 100644
index 0000000..e91d9e5
--- /dev/null
+++ b/lib/common/BotCache.ts
@@ -0,0 +1,26 @@
+import { BadWords, GlobalModel, SharedModel, type Guild } from '#lib';
+import { Collection, type Snowflake } from 'discord.js';
+
+export class BotCache {
+ public global = new GlobalCache();
+ public shared = new SharedCache();
+ public guilds = new GuildCache();
+}
+
+export class GlobalCache implements Omit<GlobalModel, 'environment'> {
+ public disabledCommands: string[] = [];
+ public blacklistedChannels: Snowflake[] = [];
+ public blacklistedGuilds: Snowflake[] = [];
+ public blacklistedUsers: Snowflake[] = [];
+}
+
+export class SharedCache implements Omit<SharedModel, 'primaryKey'> {
+ public superUsers: Snowflake[] = [];
+ public privilegedUsers: Snowflake[] = [];
+ public badLinksSecret: string[] = [];
+ public badLinks: string[] = [];
+ public badWords: BadWords = {};
+ public autoBanCode: string | null = null;
+}
+
+export class GuildCache extends Collection<Snowflake, Guild> {}