diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-17 22:41:38 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-17 22:41:38 +0200 |
commit | a467c863993d2513a605441e68eed7cd15e53923 (patch) | |
tree | 10ef7f534b3c38e736da7ee43e5ef4a91d748168 | |
parent | :sparkles: message mention parsing (diff) | |
download | server-a467c863993d2513a605441e68eed7cd15e53923.tar.xz |
:sparkles: mention regex
-rw-r--r-- | util/src/util/Regex.ts | 4 | ||||
-rw-r--r-- | util/src/util/index.ts | 1 |
2 files changed, 5 insertions, 0 deletions
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"; |