Skip to content

Commit

Permalink
fix(presenceUpdate): abort early when user is a bot
Browse files Browse the repository at this point in the history
  • Loading branch information
tippfehlr committed Jun 24, 2024
1 parent 29992cf commit ed80bef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/bot.presenceUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ export async function processRoles({
export function initPresenceUpdate() {
// PresenceUpdate fires once for every guild the bot shares with the user
client.on(Events.PresenceUpdate, async (oldMember, newMember) => {
if (newMember.user?.bot) return;
const startTime = Date.now();
stats.presenceUpdates++;

Expand Down

0 comments on commit ed80bef

Please sign in to comment.