{"id":13640161,"url":"https://github.com/MasterGroosha/telegram-report-bot","last_synced_at":"2025-04-20T02:32:49.784Z","repository":{"id":44484690,"uuid":"223013246","full_name":"MasterGroosha/telegram-report-bot","owner":"MasterGroosha","description":"A simple bot to handle reports from users in your chat","archived":false,"fork":false,"pushed_at":"2022-05-11T11:12:34.000Z","size":167,"stargazers_count":109,"open_issues_count":1,"forks_count":23,"subscribers_count":6,"default_branch":"aiogram3","last_synced_at":"2024-08-03T01:16:18.687Z","etag":null,"topics":["aiogram","aiogram3","moderation","python","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MasterGroosha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-20T19:38:29.000Z","updated_at":"2024-07-19T06:37:34.000Z","dependencies_parsed_at":"2022-09-22T08:31:12.464Z","dependency_job_id":null,"html_url":"https://github.com/MasterGroosha/telegram-report-bot","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterGroosha%2Ftelegram-report-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterGroosha%2Ftelegram-report-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterGroosha%2Ftelegram-report-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterGroosha%2Ftelegram-report-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasterGroosha","download_url":"https://codeload.github.com/MasterGroosha/telegram-report-bot/tar.gz/refs/heads/aiogram3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223816435,"owners_count":17207859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiogram","aiogram3","moderation","python","telegram","telegram-bot"],"created_at":"2024-08-02T01:01:08.498Z","updated_at":"2024-11-09T10:30:52.253Z","avatar_url":"https://github.com/MasterGroosha.png","language":"Python","funding_links":[],"categories":["Bots"],"sub_categories":[],"readme":"# Report bot for Telegram\n\n\u003ca href=\"https://hub.docker.com/r/groosha/telegram-report-bot\"\u003e\u003cimg src=\"https://img.shields.io/badge/Docker%20Hub-telegram--report--bot-blue\"\u003e\u003c/a\u003e \n\nThis repository contains source code of a small yet rather powerful bot for Telegram, which handles reports from users and passes them to admins. \nUses [aiogram](https://github.com/aiogram/aiogram) framework.  \nThe main goal is to build a bot with no external database needed. Thus, it may lack some features, but hey, it's open source!\n\n#### Screenshot\n\n![Left - main group. Right - group for admins only. If you don't see this image, please check GitHub repo](screenshots/cover.png)\n\n#### Features\n* `/report` command to gather reports from users;  \n* Reports can be sent to a dedicated chat or to dialogues with admins;  \n* `/ro` command to set user \"read-only\" and `/nomedia` to allow text messages only;\n* [optional] Automatically remove \"user joined\" service messages;  \n* [optional] Automatically ban channels (since \n[December 2021](https://telegram.org/blog/protected-content-delete-by-date-and-more#anonymous-posting-in-public-groups) \nusers can write on behalf of their channels);  \n* If text message starts with `@admin`, admins are notified;  \n* A simple interface for admins to choose one of actions on reported message;  \n* English and Russian languages are built-in.\n\n#### Requirements\n* Python 3.9 and above;  \n* Tested on Linux, should work on Windows, no platform-specific code is used;  \n* Systemd (you can use it to enable autostart and autorestart) or Docker.\n\n#### Installation  \n1. Go to [@BotFather](https://t.me/telegram), create a new bot, write down its token, add it to your existing group \nand **make bot an admin**. You also need to give it \"Delete messages\" permission.  \n2. Create a separate group where report messages will be sent and add all group admins there. \n**Remember**: anyone who is in that group may perform actions like \"Delete\", \"Ban\" and so on, so be careful.  \n3. Use some bot like [@my_id_bot](https://t.me/my_id_bot) to get IDs of these two groups;  \n4. Clone this repo and `cd` into it;  \n5. Copy `env_dist` to `.env` (with dot). **Warning**: files starting with dot may be hidden in Linux, \nso don't worry if you stop seeing this file, it's still here!  \n6. Replace default values with your own;  \n7. Now choose installation method: **systemd** or **Docker**\n\n##### systemd\n1. Create a venv (virtual environment): `python3.9 -m venv venv` (or any other Python 3.7+ version);  \n2. `source venv/bin/activate \u0026\u0026 pip install -r requirements.txt`;\n3. Rename  `reportbot.service.example` to `reportbot.service` and move it to `/etc/systemd/system`;  \n4. Open that file and change values for `WorkingDirectory`, `ExecStart` and `EnvironmentFile` providing the correct \npath values;  \n5. Start your bot and enable its autostart: `sudo systemctl enable reportbot.service --now`;  \n6.Check your bot's status and logs: `systemctl status reportbot.service`.\n\n##### Docker\n1. Build and run your container: `docker-compose up -d`.\n\nAlternatively, check [docker-compose.yml](docker-compose.yml) file from this repo.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMasterGroosha%2Ftelegram-report-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMasterGroosha%2Ftelegram-report-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMasterGroosha%2Ftelegram-report-bot/lists"}