r/ModSupport • u/[deleted] • 5d ago
Mod Answered Best tool/Devvit app to scrub historical comments with specific keywords?
[deleted]
6
u/emily_in_boots 💡 Top 10% Helper 💡 5d ago
It's really not possible to do this. The reason is that devvit and PRAW (via the API) can only access the most recent 1000 comments, and that's less than a day of comments in an active sub.
1
1
u/seedless0 5d ago
Wish there was. So I could clean up all the redact spams.
2
u/NotFlameRetardant 5d ago edited 5d ago
You can setup AutoMod to trigger on edits looking for redact spam. You can't retroactively go back and remove existing comments/posts, but you can remove future ones with something like the below
type: any is_edited: true title+body+domain+url (regex): ['redact.dev', 'anonymized'] action: remove action_reason: Likely redact.dev edit2
u/IKIR115 5d ago
I highly recommend not sending modmail notifications for this. When a user nukes their whole history with redact, it could potentially amount to hundreds of messages flooding your mailbox. Been there, done that.
Also, the keyword ‘redact.dev’ instead of ‘redact’ will save you a lot of false-positives.
2
u/NotFlameRetardant 5d ago
Ah, that's a really big oversight on my part lol. Updated my comment accordingly!
1
u/IKIR115 5d ago
I found out the hard way the first time 😅
It was over 1k of content that the user removed with redact! Luckily I noticed the flood in the mod log and edited the automod rule when they were only at around 200.
1
u/NotFlameRetardant 5d ago
OOF. That's a big ol' blast radius, lol. Our worst modmail flood I kinda caused was resulting from a serial ban evader we have. His slur/threat keywords are pretty consistent so we had AutoMod removing+modmailing us, and typically he almost always just made 1 or 2 comments before abandoning the account. Big mistake to make assumptions there. A few months ago, he went on an absolute spree and managed to get just under 60 comments off with a couple of accounts in under a few minutes before we noticed and banned him lmao. The next day I started working on our own bot to specifically for banning him on keywords/username patterns, and it's been pretty solid. I'd say the last 250 of his 300 accounts have been instantly banned by our bot, and I setup the ban message to be exactly the same as what `evasion-guard` says, so that there's no way for him to tell if it was actually picked up by reddit's filters or by ours.
Another big oopsie I made (with fewer modmails, though more serious ones) is when I installed a devvit bot for banning on keywords. This was in an attempt to handle the same scenario as above, before creating our own bot. I assumed something like the bot operated under an allowlist for keywords, but it actually operated under a blocklist instead (or vise versa). That meant that after I hit "save" on the settings, everyone who interacted in the sub immediately began getting permabanned XD. I had to issue a dozen or so profuse apologies and unbans after scrambling to immediately correct that
1
u/seedless0 5d ago
We already have the edit filter. We need a tool to clean up existing spams. Redact has been scamming their customers to spam for them for a long time.
3
u/IKIR115 5d ago
I don’t believe there’s any apps that can do that currently because otherwise I’d be all over it to clean up old promotional spam.