Skip to content

Commit

Permalink
chore: missed pushing changes from other files
Browse files Browse the repository at this point in the history
  • Loading branch information
AwesomeStickz committed Oct 27, 2024
1 parent e1ec156 commit c1634cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions setupCacheEdits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const setupCacheEdits = <T extends ProxyCacheTypes, B extends Bot>(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);
}

Expand All @@ -25,7 +26,8 @@ export const setupCacheEdits = <T extends ProxyCacheTypes, B extends Bot>(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);
}

Expand Down
10 changes: 5 additions & 5 deletions setupDummyEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export const setupDummyEvents = <T extends ProxyCacheTypes, B extends Bot>(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;
};
Expand Down

0 comments on commit c1634cb

Please sign in to comment.