mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 13:24:14 +02:00
fix(arabot): prevent readding nonvegan role in fixRoles
This commit is contained in:
parent
2518376f3b
commit
513d3ec581
@ -126,8 +126,11 @@ 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)
|
||||||
|
) {
|
||||||
count++;
|
count++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -160,9 +163,6 @@ export class FixRolesOnReady extends Listener {
|
|||||||
count++;
|
count++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
count++;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give the roles to the member
|
// Give the roles to the member
|
||||||
|
Loading…
x
Reference in New Issue
Block a user