From 0b3d57d2da0a011644382a168d59a5a84b82646e Mon Sep 17 00:00:00 2001 From: smyalygames Date: Fri, 17 Feb 2023 01:37:55 +0000 Subject: [PATCH] feat(arabot): add restrictions for vegans --- src/commands/mod/restriction/restrict.ts | 9 ++------- src/commands/mod/restriction/unrestrict.ts | 2 +- src/utils/devIDs.ts | 2 +- src/utils/ids.ts | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/commands/mod/restriction/restrict.ts b/src/commands/mod/restriction/restrict.ts index f33b34c..065be95 100644 --- a/src/commands/mod/restriction/restrict.ts +++ b/src/commands/mod/restriction/restrict.ts @@ -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'], }); diff --git a/src/commands/mod/restriction/unrestrict.ts b/src/commands/mod/restriction/unrestrict.ts index cc2e92e..eeb3496 100644 --- a/src/commands/mod/restriction/unrestrict.ts +++ b/src/commands/mod/restriction/unrestrict.ts @@ -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'], }); diff --git a/src/utils/devIDs.ts b/src/utils/devIDs.ts index c1fcd61..f8e2fb4 100644 --- a/src/utils/devIDs.ts +++ b/src/utils/devIDs.ts @@ -43,7 +43,7 @@ const devIDs = { '999431674997788676', // Restricted 2 '999431674997788675', // Restricted 3 '999431674997788674', // Restricted 4 - // '999431674997788677', // Restricted Vegan + '1075952207091994726', // Restricted Vegan ], }, staff: { diff --git a/src/utils/ids.ts b/src/utils/ids.ts index ba55abb..e09e7d2 100644 --- a/src/utils/ids.ts +++ b/src/utils/ids.ts @@ -46,7 +46,7 @@ let IDs = { '872482843304001566', // Restricted 2 '856582673258774538', // Restricted 3 '872472182888992858', // Restricted 4 - // '809769217477050369', // Restricted Vegan + '1075951477379567646', // Restricted Vegan ], }, staff: {