mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 15:04:29 +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);
|
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);
|
||||||
|
|
||||||
|
@ -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)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user