Allows common chat users to tag admins by simple command .report
as reply to spam messages.
Chat administrators can use following commands as reply to messages if the bot hasn't admin permissions:
.ping
- to check if the bot is alive and to see its version;.admin
- to refresh bot admin list.
Chat administrators can use following commands as reply to messages if the bot has admin permissions:
.ban+[ period (in minutes, may be specified as 60*24*10 as 10 days)]
- ban replied user and revoke messages;.ban [ period]
- ban replied user and don't revoke messages;.mute[ period]
- mute replied user;.woof
- allow to chat replied user;
The bot is based on Tunneled Webhooks, so can be used at local PC or server.
Clone project from repository (git clone https://github.com/deepeloper/telegram-watchdog
) and run composer install
.
Copy «config.skeleton.php» to «config.php» and modify it:
- «service/command» value to use at local PC;
- «webhook/Telegram/Watchdog/token» value (register Telegram bot to receive bot auth token);
- also you can specify:
- bot's command prefix («webhook/Telegram/Watchdog/commandPrefix», "." by default);
- whether to tag chat creator when common chat user replying by
.report
(«webhook/Telegram/Watchdog/tagChatCreator»); - delay for
.woof
command execution.
Invite the bot to chats and optionally set admin permissions.