diff --git a/README.md b/README.md index c56094f..f47b2e6 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ Each cache will be in their own property under `bot.cache` and each of them have # **Important Things To Note:** -- Make sure to include the correct `client.transformers.desiredProperties` somewhere in your code, this must include at least **all** the properties from `client.cache.options.desiredProps` for it to cache all those properties you want to cache. -- It's not recommended to dynamically change `client.cache.options.cacheInMemory` or `client.cache.options.cacheOutsideMemory` since it may not cache newly added cache if events for that isn't setup. If you need to do so, you need to manually rerun the `setupDummyEvents` function. - - You should also avoid directly replacing `client.events` (like `client.events = { ready: ReadyFunction }`) since it'll override the dummy events setup by the cache proxy, which may make it unable to cache data. Instead, assign to individual event properties, like `client.events.ready = ReadyFunction`, `client.events.messageCreate = MessageCreateFunction` etc. +- Make sure to include the correct `bot.transformers.desiredProperties` somewhere in your code, this must include at least **all** the properties from `bot.cache.options.desiredProps` for it to cache all those properties you want to cache. +- It's not recommended to dynamically change `bot.cache.options.cacheInMemory` or `bot.cache.options.cacheOutsideMemory` since it may not cache newly added cache if events for that isn't setup. If you need to do so, you need to manually rerun the `setupDummyEvents` function. + - You should also avoid directly replacing `bot.events` (like `bot.events = { ready: ReadyFunction }`) since it'll override the dummy events setup by the cache proxy, which may make it unable to cache data. Instead, assign to individual event properties, like `bot.events.ready = ReadyFunction`, `bot.events.messageCreate = MessageCreateFunction` etc. # Useful Options To Note: diff --git a/setupCacheRemovals.ts b/setupCacheRemovals.ts index 5d45cde..d53e60f 100644 --- a/setupCacheRemovals.ts +++ b/setupCacheRemovals.ts @@ -26,6 +26,7 @@ export const setupCacheRemovals = (bot: BotWithProxyCache { const payload = data.d as DiscordGuildMemberRemove; + GUILD_MEMBER_REMOVE(bot, data, shardId); bot.cache.members.delete(bot.transformers.snowflake(payload.user.id), bot.transformers.snowflake(payload.guild_id));