adCheck small bug

This commit is contained in:
Neko Life 2021-05-29 01:27:05 +00:00
parent 129e070cb8
commit de80d353e7

View file

@ -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;
}
/**