diff options
Diffstat (limited to 'lib/common/BotCache.ts')
-rw-r--r-- | lib/common/BotCache.ts | 26 |
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> {} |