Tuesday, September 29, 2020

Using RainRatBot for Moderation - /discreetadmin

Here's a feature I wanted to give a try. The idea is that a user of a group can PM @rainratbot and the message is sent to the admin or admin group that RainRatBot has on file. Like using @admin in the group, but discreet. This is a PM with @rainratbot




And this is how it looks when it gets to the admin or admin group on file:


As you can see the admin is told who the message comes from. It is discreet, not anonymous.

To use it, PM @rainratbot with the command 

/discreetadmin [group id] [message]

"group id" is the numerical group number for the group, which is assigned by Telegram. Yeah, it's not convenient to have to know it; I'm not stoked about this part. But if you're PMing, the bot needs some way to know which group it's in reference to. You can get the group id by forwarding a message from the group to a raw info bot, or possibly the admins will give the group id when they explain to their users how to use it.

Why wouldn't I just use @admin in the group?

  • Maybe you're muted or banned.
  • Maybe it's unrelated to the conversation and you don't want to interrupt.
  • Maybe worried about retaliation from another member.

Why wouldn't I just PM the admin?

  • Maybe Telegram has you blocked from starting PMs.
  • If there's multiple admins, you message all at once.
  • Don't have to research admin if they're hard to find in user list.

What if my concern is multiple messages or requires a photo, etc?

This feature will only forward one text message. It's ultimately up to the individual admins but the hope is that one of the admins on duty will PM you back about your concern.

How do I know I typed the group id correctly and it went through?

As seen in the first image, it will tell you if it was successfully sent. If not, it will say so:




For group admins: Anti-abuse

As seen in the text in the second image, each user can only send one message per admin group, so it's impossible to flood you that way. If they send a good report, you can type

/discreetallow [user id]

in your admin group to allow them to use the feature later. If it's not a good report, you don't have to do anything, and they won't be allowed to send another. RainRatBot does not keep any record of the content of the forwarded messages so I can't judge based on content.

If it's a flood from multiple accounts with each account sending one message, you can turn it off entirely. From your admin group, type

/changegroupsettings [group id] discreetadmin False

Group id is the numerical identifier of the public group, not the admin group.

Thursday, September 3, 2020

Using RainRatBot for Moderation - Global Ban List vs Community Ban List

 The difference between the old Global Ban List and the new Community Ban List.


The big change is that the Community Ban List is now in a proper database rather than a text file.

  • Changes (bans and unbans) take effect immediately. There is no need for /reloadglobalban any more.
  • There is no need to download the whole text file to look up an entry. /sendglobalban is obsolete. Use "/queryglobalban [user id]" to look up a specific entry.
  • When a banned user uses /rrbrequestglobalunban to appeal, the full content of the unban request will be sent to the admin group(s). There is no longer any reason for /sendglobalunbanrequest
    • Each banned user can send 1 appeal through the bot. There is no longer any reason for /muteappeal
  • Because changes now take effect immediately, for better oversight, /rrbglobalban and /rrbglobalunban can only be used in the RainRatBot Administrators group. This may be expanded later.
  • It used to be that since the list was a text file, the same user id could be in the list more than once without any problem. Now that it's a database, each user id can only appear once. If you need to add more information about a ban, you can delete it, then add it back with more information.
  • Though I haven't changed every reference, I am moving to calling this list the "Community Ban List" because I am looking at adding other lists from other organizations who track spam and abuse accounts on Telegram, and need a way to distinguish them.

Using RainRatBot for Moderation - Community Ban List

If you've been using RainRatBot for defense against rogue bots, as described in https://rainratbot.blogspot.com/2018/08/using-rainratbot-for-moderation-bot_28.html you've seen it remove the rogue bot from your group after a short time. Without a Community Ban List, even if it already removed the rogue bot from another group, it's treated it as a completely new user when it joins your group. The first version of the Community Ban List was called the Global Ban List.

Any user on this list will immediately be banned as soon as they enter any participating group. This is the list for rogue bots, and the worst of the worst(real users who are a hazard to any group they join).

Users will be checked against Community Ban List as they join. Existing users will not be affected.


/rrbglobalban [user id] [reason]
Adds user id to list. (ie. /rrbglobalban 123456789 spambot) 
You must fill out the reason. Only users in the authorized group can use this; if someone outside wants to add a ban, they ask someone in the group.

/rrbglobalunban [user id]
Authorized users only. Removes user id from Community Ban List.

/queryglobalban [user id]
Authorized users only. Check if the user id is in the Community Ban List and provide the supporting information if so.


There is also an Appeals function in case of a mistake.

/rrbrequestglobalunban [reason]
Any user may use; id will be recorded. Only brings to attention of authorized users. Does not change the ban list. Each user can only appeal through the bot once, so include all the relevant information in [reason].

Saturday, August 10, 2019

Using RainRatBot for Moderation - Summary

Since the list of moderation features was spread across multiple blog posts, I'm making a summary post of what features are available and how they are activated.

Just by adding @RainRatBot to your group:

  • Remove known-bad user ids (Requires "Ban users" permission)
  • Remove known-bad display names (like "DEX airdrop") (Requires "Ban users" permission)
  • Remove latest spammers that write "hi", then edit their message to contain a link. (Requires "Ban users" and "Delete messages" permission)
  • Identify fursuits in photos if confidence above 90% (Can be suppressed per group, PM me for assistance)

Requires configuration:

If you're expecting one of the ones that requires configuration to be active in your group, PM me for assistance.

Tuesday, June 25, 2019

Using RainRatBot for Moderation - Bot Defense - Keywords Update

When I first wrote the bot defense, bots joined groups and it was a long time before they actually said anything. Back then, I said that if that changed, I would update the bot defense to keep up. Now, bots typically send spam as soon as they join.

To start updating my bot defense, I started with my keyword list. I added four public lists of spam pitches, subject lines, and domains. They were mostly oriented to email spam, but it's a starting point.

Now, if a suspected bot joins and posts text that matches something on the keyword list during the watch period, they get banned, and RainRatBot automatically deletes the spam.

I highly recommended users that use the anti-bot measures in an SFW group also give the keyword list a try. I've made dozens of additions and deletions based on feedback from group owners. In a typical SFW group, I'd expect about one false positive per year. You can ask that the keyword list be notification-only to give it a try.

Wednesday, May 29, 2019

Using RainRatBot for Moderation - Global Ban List

This is obsolete; the Global Ban List is now called the Community Ban List.


If you've been using RainRatBot for defense against rogue bots, as described in https://rainratbot.blogspot.com/2018/08/using-rainratbot-for-moderation-bot_28.html you've seen it remove the rogue bot from your group after a short time. Up until now, even if it already removed the rogue bot from another group, it's treated it as a completely new user when it joins your group; there hasn't been a Global list of rogue users, until now.

Any user on this list will immediately be banned as soon as they enter any participating group. This is the list for rogue bots, and the worst of the worst(real users who are a hazard to any group they join).

Users will be checked against Global Ban List as they join. Existing users will not be affected.


Anyone can request a global ban, however, only authorized users can approve additions.

/rrbglobalban [user id] [reason]
Adds user id to list but does not activate the ban. (ie. /rrbglobalban 123456789 spambot)
You must fill out the reason. Any user in any group may use this. The requester's user id is logged.

/rrbglobalunban [user id]
Authorized users only. Removes user id from global ban list.

/sendglobalban
Authorized users only. Reply with the proposed global ban list.

/reloadglobalban
Authorized users only. Until this command is used, changes made with /rrbglobalban, and /rrbglobalunban will not be active.


There is also an Appeals function in case of a mistake.

/rrbrequestglobalunban [reason]
Any user may use; id will be recorded. Only brings to attention of authorized users. Does not change the ban list.

/sendglobalunbanrequest
Authorized users only. View the unban requests.

Wednesday, August 29, 2018

Using RainRatBot for Moderation - Bot defense - Frequently Asked Questions

Q: When you say "looks like a bot" [Step 3], what does that mean? What if it has a false positive?


A: I won't give the exact method, because it's subject to change as new Rogue bot patterns are found. Legitimate bots are limited in what information they can retrieve from profiles. My bot looks at:
  • The @username
  • The First and Last name provided to Telegram
  • The number of profile pictures
If there is a false positive, most users clear it just by introducing themselves, which they were likely going to do anyway. Group admins are also given a command they can send to RainRatBot, if they wish to vouch for the user. If it still gets as far as banning a user, the group admins can unban like any other ban. RainRatBot doesn't (yet) maintain any ban list of its own, so the unbanned user is treated as just another new user when they rejoin.

Q: What if the suspected Rogue bot adds the Telegram-recognized bot during the 5 minute watch period?

A: If any user adds any Telegram-recognized bot to a group that's using the bot protection, the admins will get a separate PM about that. Not all Telegram-recognized bots are bad, but the admins usually want to know about it.


This is what it looks like when RainRatBot notifies the admins about a Telegram-recognized bot (I blacked out the name because it's a legitimate bot used to test, and I don't want to give the impression it's a bad bot.)

Possibly a future version will allow group owners to set a policy about Telegram-recognized bots.

Q: What if the Rogue bot is the one that sends messages to the group, and it does it within the 5 minute watch period? Would RainRatBot accept it as a actual user then?

Yes. But then we're getting into a completely different problem than the one I set out to solve. The group admins will still have gotten a message from RainRatBot about it when it first joined, so they know something's up.

If Rogue bot behaviour changes, then I'll be updating my bot to keep up.