refactor(arabot): change restricted roles array to array from IDs

This commit is contained in:
smyalygames 2023-02-14 01:31:11 +00:00
parent 7d54976cfd
commit 71cc4d461c
2 changed files with 2 additions and 14 deletions

View File

@ -82,13 +82,7 @@ export async function restrictRun(
member = await guild.members.fetch(userId);
}
const restrictRoles = [
IDs.roles.restrictions.restricted1,
IDs.roles.restrictions.restricted2,
IDs.roles.restrictions.restricted3,
IDs.roles.restrictions.restricted4,
IDs.roles.restrictions.restricted1, // Vegan Restrict
];
const restrictRoles = IDs.roles.restrictions.restricted;
let section = tolerance ? randint(3, 4) : randint(1, 2);

View File

@ -147,13 +147,7 @@ export class UnRestrictCommand extends Command {
return info;
}
const restrictRoles = [
IDs.roles.restrictions.restricted1,
IDs.roles.restrictions.restricted2,
IDs.roles.restrictions.restricted3,
IDs.roles.restrictions.restricted4,
IDs.roles.restrictions.restricted1, // Vegan restricted
];
const restrictRoles = IDs.roles.restrictions.restricted;
// Checks if the user is not restricted
if (!member.roles.cache.hasAny(...restrictRoles)) {