summary refs log tree commit diff homepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Discord.ts16
-rw-r--r--src/DiscordWebhooks.ts2
2 files changed, 8 insertions, 10 deletions
diff --git a/src/Discord.ts b/src/Discord.ts
index 1245145..110ce64 100644
--- a/src/Discord.ts
+++ b/src/Discord.ts
@@ -190,17 +190,15 @@ class Discord {
             }
           }
         }
-
-        if (['here', 'everyone'].includes(username)) {
-          // remove these large pings
-          if (!this.config.ALLOW_HERE_EVERYONE_MENTIONS) {
-            message = message
-              .replace('@everyone', '@ everyone')
-              .replace('@here', '@ here')
-          }
-        }
       }
     }
+
+    if (!this.config.ALLOW_HERE_EVERYONE_MENTIONS) {
+      message = message
+        .replace('@everyone', '@ everyone')
+        .replace('@here', '@ here')
+    }
+
     return message
   }
 
diff --git a/src/DiscordWebhooks.ts b/src/DiscordWebhooks.ts
index 77f8575..d5440c7 100644
--- a/src/DiscordWebhooks.ts
+++ b/src/DiscordWebhooks.ts
@@ -41,7 +41,7 @@ class DiscordWebhooks {
   }
 
   private parseDiscordWebhook (url: string) {
-    const re = /discord[app]?.com\/api\/webhooks\/([^\/]+)\/([^\/]+)/
+    const re = /discord(?:app)?.com\/api\/webhooks\/([^\/]+)\/([^\/]+)/
 
     // the is of the webhook
     let id = null