mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 03:44:13 +02: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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -212,10 +209,8 @@ export async function restrictRun(
|
||||
IDs.roles.nonvegan.vegCurious,
|
||||
]);
|
||||
} 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);
|
||||
} else {
|
||||
const dbRoles = await fetchRoles(userId);
|
||||
if (dbRoles.includes(IDs.roles.vegan.vegan)) {
|
||||
section = 5;
|
||||
@ -263,7 +258,7 @@ export class RestrictCommand extends Command {
|
||||
super(context, {
|
||||
...options,
|
||||
name: 'restrict',
|
||||
aliases: ['r', 'rest', 'rr'], // TODO add 'rv' when enabling vegan restrictions
|
||||
aliases: ['r', 'rest', 'rr', 'rv'],
|
||||
description: 'Restricts a user',
|
||||
preconditions: ['ModOnly'],
|
||||
});
|
||||
|
@ -35,7 +35,7 @@ export class UnRestrictCommand extends Command {
|
||||
super(context, {
|
||||
...options,
|
||||
name: 'unrestrict',
|
||||
aliases: ['ur'], // TODO add urv for when restrict vegan will be implemented
|
||||
aliases: ['ur', 'urv'],
|
||||
description: 'Unrestricts a user',
|
||||
preconditions: ['ModOnly'],
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ const devIDs = {
|
||||
'999431674997788676', // Restricted 2
|
||||
'999431674997788675', // Restricted 3
|
||||
'999431674997788674', // Restricted 4
|
||||
// '999431674997788677', // Restricted Vegan
|
||||
'1075952207091994726', // Restricted Vegan
|
||||
],
|
||||
},
|
||||
staff: {
|
||||
|
@ -46,7 +46,7 @@ let IDs = {
|
||||
'872482843304001566', // Restricted 2
|
||||
'856582673258774538', // Restricted 3
|
||||
'872472182888992858', // Restricted 4
|
||||
// '809769217477050369', // Restricted Vegan
|
||||
'1075951477379567646', // Restricted Vegan
|
||||
],
|
||||
},
|
||||
staff: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user