mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 12:44:17 +02:00
feat(arabot): add nvAccess to fetchRoles
This commit is contained in:
parent
ed3a2719f2
commit
4c5e0238b8
@ -173,9 +173,6 @@ export class UnRestrictCommand extends Command {
|
|||||||
|
|
||||||
if (await checkActive(userId)) {
|
if (await checkActive(userId)) {
|
||||||
const roles = await fetchRoles(userId);
|
const roles = await fetchRoles(userId);
|
||||||
if (roles.includes(IDs.roles.vegan.vegan)) {
|
|
||||||
roles.push(IDs.roles.vegan.nvAccess);
|
|
||||||
}
|
|
||||||
await member.roles.add(roles);
|
await member.roles.add(roles);
|
||||||
// Unrestricts the user on the database
|
// Unrestricts the user on the database
|
||||||
await unRestrict(userId, modId);
|
await unRestrict(userId, modId);
|
||||||
|
@ -37,10 +37,6 @@ export class RolesJoinServerListener extends Listener {
|
|||||||
|
|
||||||
const roles = await fetchRoles(member.id);
|
const roles = await fetchRoles(member.id);
|
||||||
|
|
||||||
if (roles.includes(IDs.roles.vegan.vegan)) {
|
|
||||||
roles.push(IDs.roles.vegan.nvAccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the user is restricted
|
// Check if the user is restricted
|
||||||
if (await checkActive(member.id)) {
|
if (await checkActive(member.id)) {
|
||||||
const section = await getSection(member.id);
|
const section = await getSection(member.id);
|
||||||
|
@ -126,6 +126,7 @@ export class VerificationJoinVCListener extends Listener {
|
|||||||
// Remove all roles from the user
|
// Remove all roles from the user
|
||||||
await member.roles.remove([
|
await member.roles.remove([
|
||||||
IDs.roles.vegan.vegan,
|
IDs.roles.vegan.vegan,
|
||||||
|
IDs.roles.vegan.nvAccess,
|
||||||
IDs.roles.trusted,
|
IDs.roles.trusted,
|
||||||
IDs.roles.nonvegan.nonvegan,
|
IDs.roles.nonvegan.nonvegan,
|
||||||
IDs.roles.nonvegan.convinced,
|
IDs.roles.nonvegan.convinced,
|
||||||
|
@ -158,6 +158,7 @@ export async function fetchRoles(userId: Snowflake) {
|
|||||||
}
|
}
|
||||||
if (roleQuery.vegan) {
|
if (roleQuery.vegan) {
|
||||||
roles.push(IDs.roles.vegan.vegan);
|
roles.push(IDs.roles.vegan.vegan);
|
||||||
|
roles.push(IDs.roles.vegan.nvAccess);
|
||||||
}
|
}
|
||||||
if (roleQuery.trusted) {
|
if (roleQuery.trusted) {
|
||||||
roles.push(IDs.roles.trusted);
|
roles.push(IDs.roles.trusted);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user