Compare commits

...

4 Commits

Author SHA1 Message Date
Anthony Berg
9b3908cdc4 fix(arabot): add delay to skipping in fixRoles
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
ESLint / Run eslint scanning (push) Waiting to run
Prettier / Run prettier scanning (push) Waiting to run
2025-01-17 22:55:47 +01:00
Anthony Berg
513d3ec581 fix(arabot): prevent readding nonvegan role in fixRoles 2025-01-17 22:54:35 +01:00
Anthony Berg
2518376f3b fix(arabot): prevent readding nonvegan role in fixRoles 2025-01-17 22:51:14 +01:00
Anthony Berg
f4f83e51b2 refactor(arabot): change timings for fixRoles 2025-01-17 22:48:19 +01:00

View File

@ -126,8 +126,12 @@ export class FixRolesOnReady extends Listener {
); );
} }
// Checks if the user is vegan // Checks if the user already has vegan or non-vegan role
if (member.roles.cache.has(IDs.roles.vegan.vegan)) { if (
member.roles.cache.has(IDs.roles.vegan.vegan) ||
member.roles.cache.has(IDs.roles.nonvegan.nonvegan)
) {
await this.delay(1000);
count++; count++;
continue; continue;
} }
@ -174,7 +178,7 @@ export class FixRolesOnReady extends Listener {
); );
// Add a delay so that there's around 4 users processed a second // Add a delay so that there's around 4 users processed a second
await this.delay(500); await this.delay(5000);
} }
// Send the logs that the fix has finished. // Send the logs that the fix has finished.