mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 09:14:17 +02:00
refactor(arabot): change restricted roles array to array from IDs
This commit is contained in:
parent
7d54976cfd
commit
71cc4d461c
@ -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);
|
||||
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user