mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-11-03 15:49:50 +01:00
feat(arabot): add restrictions for vegans
This commit is contained in:
parent
ef164125ea
commit
0b3d57d2da
@ -97,9 +97,6 @@ export async function restrictRun(
|
|||||||
await updateUser(member);
|
await updateUser(member);
|
||||||
|
|
||||||
if (member.roles.cache.has(IDs.roles.vegan.vegan)) {
|
if (member.roles.cache.has(IDs.roles.vegan.vegan)) {
|
||||||
// TODO remove this error before enabling vegan restricts
|
|
||||||
info.message = `${member} is vegan, can't restrict them yet 😭`;
|
|
||||||
return info;
|
|
||||||
section = 5;
|
section = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,10 +209,8 @@ export async function restrictRun(
|
|||||||
IDs.roles.nonvegan.vegCurious,
|
IDs.roles.nonvegan.vegCurious,
|
||||||
]);
|
]);
|
||||||
} else if (!await userExists(userId)) {
|
} else if (!await userExists(userId)) {
|
||||||
// TODO remove this error before replacing other bot role replacement
|
|
||||||
info.message = `<@${userId}> is not on this server, can't restrict them yet! 😭`;
|
|
||||||
return info;
|
|
||||||
await addEmptyUser(userId);
|
await addEmptyUser(userId);
|
||||||
|
} else {
|
||||||
const dbRoles = await fetchRoles(userId);
|
const dbRoles = await fetchRoles(userId);
|
||||||
if (dbRoles.includes(IDs.roles.vegan.vegan)) {
|
if (dbRoles.includes(IDs.roles.vegan.vegan)) {
|
||||||
section = 5;
|
section = 5;
|
||||||
@ -263,7 +258,7 @@ export class RestrictCommand extends Command {
|
|||||||
super(context, {
|
super(context, {
|
||||||
...options,
|
...options,
|
||||||
name: 'restrict',
|
name: 'restrict',
|
||||||
aliases: ['r', 'rest', 'rr'], // TODO add 'rv' when enabling vegan restrictions
|
aliases: ['r', 'rest', 'rr', 'rv'],
|
||||||
description: 'Restricts a user',
|
description: 'Restricts a user',
|
||||||
preconditions: ['ModOnly'],
|
preconditions: ['ModOnly'],
|
||||||
});
|
});
|
||||||
|
|||||||
@ -35,7 +35,7 @@ export class UnRestrictCommand extends Command {
|
|||||||
super(context, {
|
super(context, {
|
||||||
...options,
|
...options,
|
||||||
name: 'unrestrict',
|
name: 'unrestrict',
|
||||||
aliases: ['ur'], // TODO add urv for when restrict vegan will be implemented
|
aliases: ['ur', 'urv'],
|
||||||
description: 'Unrestricts a user',
|
description: 'Unrestricts a user',
|
||||||
preconditions: ['ModOnly'],
|
preconditions: ['ModOnly'],
|
||||||
});
|
});
|
||||||
|
|||||||
@ -43,7 +43,7 @@ const devIDs = {
|
|||||||
'999431674997788676', // Restricted 2
|
'999431674997788676', // Restricted 2
|
||||||
'999431674997788675', // Restricted 3
|
'999431674997788675', // Restricted 3
|
||||||
'999431674997788674', // Restricted 4
|
'999431674997788674', // Restricted 4
|
||||||
// '999431674997788677', // Restricted Vegan
|
'1075952207091994726', // Restricted Vegan
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
staff: {
|
staff: {
|
||||||
|
|||||||
@ -46,7 +46,7 @@ let IDs = {
|
|||||||
'872482843304001566', // Restricted 2
|
'872482843304001566', // Restricted 2
|
||||||
'856582673258774538', // Restricted 3
|
'856582673258774538', // Restricted 3
|
||||||
'872472182888992858', // Restricted 4
|
'872472182888992858', // Restricted 4
|
||||||
// '809769217477050369', // Restricted Vegan
|
'1075951477379567646', // Restricted Vegan
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
staff: {
|
staff: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user