fix(arabot): add potential fix for restricted roles

This commit is contained in:
smyalygames 2023-02-19 20:32:51 +00:00
parent f6149a60f5
commit 9990db84b2

View File

@ -40,7 +40,9 @@ export class RolesJoinServerListener extends Listener {
// Check if the user is restricted
if (await checkActive(member.id)) {
const section = await getSection(member.id);
roles.length = 0;
for (let i = 0; i < roles.length; i += 1) {
roles.pop();
}
roles.push(IDs.roles.restrictions.restricted[section - 1]);
}