Skip to content

Commit

Permalink
perf: fetching roles takes too long
Browse files Browse the repository at this point in the history
  • Loading branch information
tippfehlr committed Mar 12, 2024
1 parent f4ab841 commit ff1036d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/modules/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ client.on(Events.PresenceUpdate, async (oldMember, newMember) => {
// await newMember.member?.fetch(true);
// if (debug) console.timeEnd('fetch member ' + date);

if (debug) console.time('fetch roles');
await newMember.guild.roles.fetch();
if (debug) console.timeEnd('fetch roles');

if (
guildConfig.requiredRoleID !== null &&
newMember.member?.roles.cache.has(guildConfig.requiredRoleID)
Expand Down

0 comments on commit ff1036d

Please sign in to comment.