NameFilterBot

namefilterbot telegram bot

Bot to prevent users to join chat if their name or username contains restricted words

Install

Follow these steps:

  • Add @namefilterbot as admin into your chatroom
  • Give bot a permission to delete messages
  • Give bot a permission to ban users
  • Configure list of words restricted in scree names and usernames (see commands section)

Commands

  • /namefilter config - see bot configuration for the current chat e.g. list of blocked words
  • /namefilter check - check if bot is installed correctly.
  • /namefilter set notify_actions=yes - tell bot to write explanation to the chat about deleted messages (recommended).
  • /namefilter set notify_actions=no - tell bot to remove messages silently
  • /namefilter add screen-name-filter WORD - add word which is restricted to be in users' screen names. Screen name is a visible name of user i.e. first name and last name. Example: /namefilter add screen-name-filter bitcoin
  • /namefilter remove screen-name-filter WORD - stop blocking WORD in users' screen names. Example: /namefilter remove screen-name-filter bitcoin
  • /namefilter add account-name-filter WORD - add WORD which is restricted to be in users' account names. Account name aka username is usually displayed with leading "@" character. Not every user has account name. Example: /namefilter add account-name-filter bitcoin
  • /namefilter remove account-name-filter WORD - stop blocking WORD in users' account names. Example: /namefilter remove account-name-filter bitcoin
  • /namefilter reload_admins - ask bot to reload admin IDs for current chat. Admins list is collected once and cached. Use this command to update cached data.

All these commands have to be sent to the chat which you want to configure. Do not send this command in private message to the bot, it will ignore such private messages.

FAQ

How to check if bot installed correctly?

First, complete installation instructions. Then type into chat this command: /grep check. Fix any issues bot talkes about.

How words are matched?

Word matches if it contains in any part of name. If you want to match word strictly from the beginning of name then use leading "!" character. For example: "!bitcoin". If you want to match word strictly at the end of name then used trailing "!" character. For example: "bitcoin!"