Skip to content

Telegram bot providing tag chat admins by replying to spam messages

License

Notifications You must be signed in to change notification settings

deepeloper/telegram-watchdog

Repository files navigation

Telegram Watchdog Chat Bot

PHP 8.0 GitHub license GitHub issues Views Clones

Donation

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.

Installation

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.

About

Telegram bot providing tag chat admins by replying to spam messages

Resources

License

Stars

Watchers

Forks

Packages

No packages published