Telegram bot that logs and blocks unwanted private messages.
 
 
Go to file
Michael De Roover 95761d9c07
Add support for loading auto-reply from file
2023-08-01 01:55:57 +02:00
bin Add support for loading auto-reply from file 2023-08-01 01:55:57 +02:00
init Fix init scripts 2022-01-02 04:31:17 +01:00
.gitignore Ignore files and directories created at runtime 2023-08-01 00:40:36 +02:00
install Make settings.json owned by telelog user 2023-08-01 00:33:43 +02:00
readme.md Add some more info to readme 2022-01-07 19:53:24 +01:00

readme.md

Telegram logger & blocker

This project contains the source code of the logging/blocking functionality of my (@vimicito's) userbot. Like ubot it only depends on Python and Telethon.

The officially supported environments are Debian and Alpine Linux running in LXC containers. A separate user is created, making it possible to directly run on host systems with these distributions too, without significant security implications. If you port the bot to other (otherwise incompatible) systems, please open a pull request to get it merged in.

In terms of functionality, the bot logs private messages and blocks unwanted PM/DM. When unblocked by the userbot's owner, a correspondent can send another message and the bot will not trigger a blocking action any longer. This way an approval system can be effectively enforced.

Credentials

Visit my.telegram.org to get your API ID and API hash values. Then run ./install from within the cloned repository, where you can add these values.

License

This project is intended for personal use only. All rights reserved.

Disclaimer

Running a logging service on Telegram could technically violate their ToS, as all clients are required to delete messages on their endpoint when so requested by either correspondent. This logger obviously ignores such requests. Telegram has no way to tell what the client does with the messages upon receiving them, but please don't be too vocal with it either. This project assumes no responsibility for consequences put forth by Telegram as a result of running it.

The intent is there to make the bot expose a configuration flag during installation, which will make the bot stop logging and only create a file with the correspondent's chat ID. This way the bot would only block messages, without logging any messages. With this feature the bot would completely avoid ToS violations. Currently this is not implemented.