From c1634cb23aa897407478b18a366fba5ec86210e5 Mon Sep 17 00:00:00 2001 From: Awesome Stickz Date: Sun, 27 Oct 2024 20:41:15 +0530 Subject: [PATCH] chore: missed pushing changes from other files --- setupCacheEdits.ts | 6 ++++-- setupDummyEvents.ts | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/setupCacheEdits.ts b/setupCacheEdits.ts index d5445d6..d3f7512 100644 --- a/setupCacheEdits.ts +++ b/setupCacheEdits.ts @@ -11,7 +11,8 @@ export const setupCacheEdits = (bot: B const guild = bot.cache.guilds.memory.get(guildID); if (guild) { - guild.memberCount++; + if (guild.memberCount) guild.memberCount++; + await bot.cache.guilds.set(guild); } @@ -25,7 +26,8 @@ export const setupCacheEdits = (bot: B const guild = bot.cache.guilds.memory.get(guildID); if (guild) { - guild.memberCount--; + if (guild.memberCount) guild.memberCount--; + await bot.cache.guilds.set(guild); } diff --git a/setupDummyEvents.ts b/setupDummyEvents.ts index 6c4a89c..8f11573 100644 --- a/setupDummyEvents.ts +++ b/setupDummyEvents.ts @@ -8,15 +8,15 @@ export const setupDummyEvents = (bot: const { cacheInMemory, cacheOutsideMemory } = bot.cache.options || {}; // Guild - if (cacheInMemory?.guilds || cacheOutsideMemory?.guilds) setupDummyGuildEvents(eventsRequired); + if (cacheInMemory?.guild || cacheOutsideMemory?.guild) setupDummyGuildEvents(eventsRequired); // Channel - if (cacheInMemory?.channels || cacheOutsideMemory?.channels) setupDummyChannelEvents(eventsRequired); + if (cacheInMemory?.channel || cacheOutsideMemory?.channel) setupDummyChannelEvents(eventsRequired); // Role - if (cacheInMemory?.roles || cacheOutsideMemory?.roles) setupDummyRoleEvents(eventsRequired); + if (cacheInMemory?.role || cacheOutsideMemory?.role) setupDummyRoleEvents(eventsRequired); // Member - if (cacheInMemory?.members || cacheOutsideMemory?.members) setupDummyMemberEvents(eventsRequired); + if (cacheInMemory?.member || cacheOutsideMemory?.member) setupDummyMemberEvents(eventsRequired); // User - if (cacheInMemory?.users || cacheOutsideMemory?.users) setupDummyUserEvents(eventsRequired); + if (cacheInMemory?.user || cacheOutsideMemory?.user) setupDummyUserEvents(eventsRequired); for (const event of eventsRequired) bot.events[event] ??= ignore; };