Skip to content

Telegram bot that sends reports on telegram channels by pyrogram client. Bot must be used for reporting russian propaganda channels.

Notifications You must be signed in to change notification settings

progdad/ReportTelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UPD: The Bot was permanently terminated, and it's not to be found on Telegram. The repository is not deleted as it contains useful examples on working with different python tools for Telegram.

.

Introduction

It is the source code of @blockru_bot telegram bot. Bot sends reports on telegram channels you send him.

.

.

.

Quick Setup

First and foremost is to setup a userbot for your telegram account. It's implemented with the pyrogram library.

Complete instruction(Ukrainian language)

.

.

.

Project Structure:

*The project structure is organized as follows to manage various aspects of the bot's functionality

1 logs/ directory is just logs. It contains .log files for each user who has merely started the bot. Each log file name is just a user id in telegram - <user_id>.log.

.

.

2 user_sessions/ dir contains user sessions of users' userbots.

.

.

3 scripts/ directory contains all the python project files:

.

3.1 bot.py is the primary project file that runs telegram bot. __ init __.py file contains API_BOT_TOKEN variable that is supposed to save the bot's api token.

.

3.2 core_buttons/ .py files in this directory handle inline and keyboard buttons.

.

3.3 database/ dir stores sqlite database.db file which is created when the first user to use the bot sets up his userbot data. Database contains only three fields: user_id, api_id and api_hash, that are needed every time when a user reports channels. This directory also has api_data.py file which interacts with the database. aiosqlite library is used as an sqlite driver for python.

.

3.4 logger_settings/ is a directory for handling logs and sending error messages to users.

.

3.5 handlers/ directory has two primary project tools for the project bot:

3.5.1 setup_userbot.py stores a class which is responsible for setting up userbots and userbot sessions.

3.5.2 report_handler.py sends reports.

.

fsm_states/ directory contains all the aiogram FSMContext states. .

About

Telegram bot that sends reports on telegram channels by pyrogram client. Bot must be used for reporting russian propaganda channels.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages