From 26803a33af5a7cf99a9f11ca99ab4b609954044f Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Tue, 30 Aug 2022 17:41:02 +0000 Subject: [PATCH] fix: cache members --- plugins/cache/mod.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/cache/mod.ts b/plugins/cache/mod.ts index bea18f488..7a8e1c0e6 100644 --- a/plugins/cache/mod.ts +++ b/plugins/cache/mod.ts @@ -1,7 +1,7 @@ import { Bot, Collection, DiscordGuildEmojisUpdate } from "./deps.ts"; -import { setupCacheRemovals } from "./src/setupCacheRemovals.ts"; import { addCacheCollections, BotWithCache } from "./src/addCacheCollections.ts"; import { setupCacheEdits } from "./src/setupCacheEdits.ts"; +import { setupCacheRemovals } from "./src/setupCacheRemovals.ts"; // PLUGINS MUST TAKE A BOT ARGUMENT WHICH WILL BE MODIFIED export function enableCachePlugin(rawBot: B): BotWithCache { @@ -26,6 +26,10 @@ export function enableCachePlugin(rawBot: B): BotWithCache< channels.forEach((channel) => { bot.transformers.channel(bot, { channel, guildId: result.id }); }); + + payload.guild.members?.forEach((member) => { + bot.transformers.member(bot, member, result.id, bot.transformers.snowflake(member.user!.id)); + }); } // Return the result