From de80d353e75c7dc2ede6c50bfc17bad6b3b05834 Mon Sep 17 00:00:00 2001 From: Neko Life Date: Sat, 29 May 2021 01:27:05 +0000 Subject: [PATCH] adCheck small bug --- resources/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/functions.js b/resources/functions.js index cb15a4a..ac57c46 100644 --- a/resources/functions.js +++ b/resources/functions.js @@ -247,10 +247,10 @@ function tryReact(msg, reaction) { function sentAdCheck(content) { if (content.length > 5) { if (/(https:\/\/)?(www\.)?discord\.gg\/(?:\w{2,15}(?!\w)(?= *))/.test(content)) { - let newCont = content.replace(/(https:\/\/)?(www\.)?discord\.gg\/(?:\w{2,15}(?!\w)(?= *))/, '`Some invite link goes here`'); - return newCont; + content = content.replace(/(https:\/\/)?(www\.)?discord\.gg\/(?:\w{2,15}(?!\w)(?= *))/, '`Some invite link goes here`'); } } + return content; } /**