From e00651dc2f75d0dd05177f6dd29552f2787a5f70 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 17 Aug 2021 22:41:38 +0200 Subject: :sparkles: mention regex --- util/src/util/Regex.ts | 4 ++++ util/src/util/index.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/util/src/util/Regex.ts b/util/src/util/Regex.ts index bbd48bca..83fc9fe8 100644 --- a/util/src/util/Regex.ts +++ b/util/src/util/Regex.ts @@ -1,3 +1,7 @@ export const DOUBLE_WHITE_SPACE = /\s\s+/g; export const SPECIAL_CHAR = /[@#`:\r\n\t\f\v\p{C}]/gu; export const CHANNEL_MENTION = /<#(\d+)>/g; +export const USER_MENTION = /<@!?(\d+)>/g; +export const ROLE_MENTION = /<@&(\d+)>/g; +export const EVERYONE_MENTION = /@everyone/g; +export const HERE_MENTION = /@here/g; diff --git a/util/src/util/index.ts b/util/src/util/index.ts index 0aad15f2..e52a23b7 100644 --- a/util/src/util/index.ts +++ b/util/src/util/index.ts @@ -1,3 +1,4 @@ +export * from "./Regex"; export * from "./String"; export * from "./BitField"; export * from "./Intents"; -- cgit 1.4.1