A small Telegram userbot (a program that acts under the name of an existing regular user account, and not a "Telegram bot" (though nothing stops you from running it under a bot account (aside form maybe having to make the bot an admin on the channel))) that counts the number of subscribers of a channel and members of its discussion group, and then finds their sum, difference, and intersection.
- You will need python (probably 3.10+ because I've used some fancy type annotations). And dependencies installed. (Hint: use venv)
- You will need a Telegram
api_id
&api_hash
. And a willingness to potentially sacrifice your Telegram account because I've heard numerous stories of users receiving unfair bans from Telegram for using userbots even without any malicious intent. Alternatively, you can try running this under a bot account. In that case you will have to go though the hassle of promoting the bot to an admin, so that it can fetch the member list. - Copy the
config.example.py
toconfig.py
. Replace example values with yourapi_id
andapi_hash
. Set the id or the @username of the channel in question. - Launch the userbot with
python -m userbot
orpython userbot.py
. - On the first launch you will need to log in.