Open-source bot that helps you to administrate Telegram groups.
If you are about to obtain your own copy/fork of this bot complete the following steps:
- Clone repo
$ git clone https://github.com/Singapore-Tech-Entrepreneurs/telegram_bot_for_admins.git
- Install dependencies (you need node.js and NPM installed)
$ cd telegram_bot_for_admins
$ npm install
-
Create
config.json
file (you haveconfig-example.json
, you can copy and edit it). Fill it with your bot api token and mongo connection string. To obtain telegram bot token you may need to use BotFather. Free mongo database you can obtain at mlab.com, for example. -
Run it
$ npm start
- Add your bot to supergroup.
- Promote him to admin
- Activate bot by sending him any message.
- Configure it by typing
/config
right in your group. This step is important, because you can administer more than one group, so bot need to know, what group you want to configure right now. - Bot will send you keyboard (in private message), that you can use to toggle message filters and more.
You can activate and configure features in the menu, that bot sends you by typing /config
in the supergroup you want to configure. You must be admin of this supergroup.
Just push the button with function you want to toggle.
If enabled, bot will delete all "%user% joined the group" and "%user% left the group" service messages. That works only for new messages that was sent when option was enabled.
Works same as above for "pinned" service messages
If enabled, bot will delete all mesages with any arabic symbols.
If enabled, bot will delete all mesages with urls. Urls are detected by default telegram mechanism.
If enabled, bot will delete all mesages with commands, e.g. "/config
"
If enabled, bot will delete messages that user sends too frequently. Rules and type of restriction will be configurable in future releases.
/config
- start to configure current group.
/kick
- removes user from chat. Need to be written in a reply to user you want to restrict.
/ban
- removes and add user to blocklist. Need to be written in a reply to user you want to restrict.
/warn
- warns user about unacceptable behavior. Increases "warns" counter for user. If counter reach 3 - user get banned. Need to be written in a reply to user you want to restrict.
/unwarn
- clears "warns" counter. Need to be written in a reply.
/set_hello %%%
- sets hello message for new users. Message can have placeholder $name
. You can call /set_hello
without message to set default message for current group. To disable Hello message use configuration keyboard.
/help
- show help message.
You are free to help us to implement new features that described in issues. Please, make PRs into develop
branch.