import { Bot, Collection, DiscordenoChannel, DiscordenoGuild, DiscordenoMember, DiscordenoMessage, DiscordenoPresence, DiscordenoUser, } from "../deps.ts"; export type BotWithCache = B & CacheProps; export interface CacheProps extends Bot { guilds: Collection; users: Collection; members: Collection; channels: Collection; messages: Collection; presences: Collection; dispatchedGuildIds: Set; dispatchedChannelIds: Set; activeGuildIds: Set; } export function addCacheCollections(bot: B): BotWithCache { const cacheBot = bot as BotWithCache; cacheBot.guilds = new Collection(); cacheBot.users = new Collection(); cacheBot.members = new Collection(); cacheBot.channels = new Collection(); cacheBot.messages = new Collection(); cacheBot.presences = new Collection(); cacheBot.dispatchedGuildIds = new Set(); cacheBot.dispatchedChannelIds = new Set(); cacheBot.activeGuildIds = new Set(); return bot as BotWithCache; }