From 9c839955bbbac9f833292000e7ad74b9e5036dfb Mon Sep 17 00:00:00 2001 From: Lucid Kobold <72232219+LucidKobold@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:50:34 -0400 Subject: [PATCH 1/3] Update metaBlacklist.ts Update regex to escape special character . --- src/bot/features/metaBlacklist.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot/features/metaBlacklist.ts b/src/bot/features/metaBlacklist.ts index e147279..fd7173e 100644 --- a/src/bot/features/metaBlacklist.ts +++ b/src/bot/features/metaBlacklist.ts @@ -7,7 +7,7 @@ const composer = new Composer(); const feature = composer.chatType(["group", "supergroup"]); feature.hears( - /(facebook.com|meta.com|instagram.com|threads.net|whatsapp.com)/gi, + /(facebook\.com|meta\.com|instagram\.com|threads\.net|whatsapp\.com)/gi, logHandle("blacklist-detection-meta"), async (ctx: Context) => { const GROUP_IDS = process.env.GROUP_IDS -- 2.49.1 From 6a0724e60f48d5a26099f62e61b053f75e230875 Mon Sep 17 00:00:00 2001 From: Lucid Kobold <72232219+LucidKobold@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:50:51 -0400 Subject: [PATCH 2/3] Update twitterBlacklist.ts Update regex to escape special character . --- src/bot/features/twitterBlacklist.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot/features/twitterBlacklist.ts b/src/bot/features/twitterBlacklist.ts index cfb9ccb..522ea2b 100644 --- a/src/bot/features/twitterBlacklist.ts +++ b/src/bot/features/twitterBlacklist.ts @@ -7,7 +7,7 @@ const composer = new Composer(); const feature = composer.chatType(["group", "supergroup"]); feature.hears( - /(x.com|twitter.com)/gi, + /(x\.com|twitter\.com)/gi, logHandle("blacklist-detection-twitter"), async (ctx: Context) => { const GROUP_IDS = process.env.GROUP_IDS -- 2.49.1 From e28aa399e5c8b4528ea5ca05ab41f4cbd0cba4aa Mon Sep 17 00:00:00 2001 From: Lucid Kobold <72232219+LucidKobold@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:51:31 -0400 Subject: [PATCH 3/3] Update embedCheck.ts Update regex to escape special character . --- src/bot/features/embedCheck.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bot/features/embedCheck.ts b/src/bot/features/embedCheck.ts index 1076345..e8783c3 100644 --- a/src/bot/features/embedCheck.ts +++ b/src/bot/features/embedCheck.ts @@ -27,11 +27,11 @@ feature.on( if (embeds.length) { const metaLinks = embeds.filter(({ url }) => url.match( - /(facebook.com|meta.com|instagram.com|threads.net|whatsapp.com)/gi + /(facebook\.com|meta\.com|instagram\.com|threads\.net|whatsapp\.com)/gi ) ); const twitterLinks = embeds.filter(({ url }) => - url.match(/(x.com|twitter.com)/gi) + url.match(/(x\.com|twitter\.com)/gi) ); if (metaLinks.length && twitterLinks.length) { -- 2.49.1