From 3c09aaeb05d0ad80df41d357a3eb8b3d33cf9aa9 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 25 Aug 2024 18:06:25 +0200 Subject: [PATCH] fix: fixed parsing roles to allowed mentions --- lib/api/SendWebhookMessage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/SendWebhookMessage.ts b/lib/api/SendWebhookMessage.ts index 8150535..fc5553c 100644 --- a/lib/api/SendWebhookMessage.ts +++ b/lib/api/SendWebhookMessage.ts @@ -72,5 +72,5 @@ const roleMatcherRegex = /<@&(\d{17,20})>/g; function extractRoles(text: string): string[] { const matches = text.matchAll(roleMatcherRegex); - return [...matches].map((match) => match.groups?.id).filter(Boolean) as string[]; + return [...matches].map((match) => match.at(1)).filter(Boolean) as string[]; }