summary refs log tree commit diff homepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Discord.ts2
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('#')