diff options
author | destruc7i0n <6181960+destruc7i0n@users.noreply.github.com> | 2020-08-04 19:09:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 19:09:27 -0400 |
commit | 49bcccec71e38cc487bfd2bc7b05294357487eb7 (patch) | |
tree | 23fd84df26563d6c4db21213d1eb24dfccf64ae0 | |
parent | Merge pull request #59 from MarshallOliver/master (diff) | |
parent | Update regex for replaceDiscordMentions (diff) | |
download | shulker-49bcccec71e38cc487bfd2bc7b05294357487eb7.tar.gz shulker-49bcccec71e38cc487bfd2bc7b05294357487eb7.zip |
Merge pull request #61 from MarshallOliver/Discord-mentions-regex
Update regex for replaceDiscordMentions
-rw-r--r-- | src/Discord.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Discord.ts b/src/Discord.ts index bb3b9a2..12ac656 100644 --- a/src/Discord.ts +++ b/src/Discord.ts @@ -148,7 +148,7 @@ class Discord { } private replaceDiscordMentions(message: string): string { - const possibleMentions = message.match(/@*.*#[0-9]{4}/gim) + const possibleMentions = message.match(/@[^#\s]*[#]?[0-9]{4}/gim) if (possibleMentions) { for (let mention of possibleMentions) { const mentionParts = mention.split('#') |