From 2ec6e002fec0c7ef5cacec0374ef8f9dea3c8124 Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Thu, 16 May 2024 11:30:41 +0100 Subject: [PATCH] feat: ignore link check for role (#800) --- src/links/checkLinks.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/links/checkLinks.ts b/src/links/checkLinks.ts index 6e2e38b4..5234142d 100644 --- a/src/links/checkLinks.ts +++ b/src/links/checkLinks.ts @@ -12,6 +12,11 @@ export const checkLinks = async ( ): Promise => { const content = message.content; + // ignore link check in message from users who have the "team eddie" role + if (message.member?.roles.cache.some((role) => role.name === 'team eddi')) { + return null; + } + try { const urlMatch = content?.match(urlPattern); if (!urlMatch) {