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); member = await guild.members.fetch(userId);
} }
const restrictRoles = [ const restrictRoles = IDs.roles.restrictions.restricted;
IDs.roles.restrictions.restricted1,
IDs.roles.restrictions.restricted2,
IDs.roles.restrictions.restricted3,
IDs.roles.restrictions.restricted4,
IDs.roles.restrictions.restricted1, // Vegan Restrict
];
let section = tolerance ? randint(3, 4) : randint(1, 2); let section = tolerance ? randint(3, 4) : randint(1, 2);

View File

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