NightDev Community Forums

Can nightbot filter out a series of 12 numbers?

I saw the option for filtering symbols, but I was wondering if “symbols” also include numbers. I stream a game where people constantly feel the need to post their 12 digit “friend code”, which I wind up redirecting them to my Discord where I have a section for it. But I would rather have nightbot be able to filter out series of 12 numbers automatically rather than have to have my mods manually delete these everytime they come up. Will “Excess Symbols” set to 12 work for this?

Idk if numbers count as symbols but you can go to blacklisted words and add in “~/(\d{12})/” and possible a custom response leading to your discord :wink:

1 Like

Ooh, so that works! But the problem is, friend codes are normally posted in a 1234 5678 9101 format rather than a straight 123456789101 format. If it’s posted without the spacing, nightbot picks up on it and gives a warning with a redirect to my discord which is great. But if they post it with the spacing it doesn’t pick up on it. I’m not great at customizing commands; is there a simple edit you can make to that command that would also work with the spacing in there? Thanks in advance!

EDIT: nevermind, I fooled around with it and a friend of mine pointed out that ~/(\d{4} \d{4} \d{4})/ would probably work. Sure enough, gave it a try and we’re good now. Thanks again!

1 Like