06-17-2018, 04:20 AM
I modified this code to export 30.000 users from Telegram Chats to .txt file and later send them a message to promote my channel.
I hope is usefull for all u.
I used: Telethon - https://github.com/LonamiWebs/Telethon
1st. Create an API app here: https://my.telegram.org/apps and put your credentials on /api/settings file
2nd. Install Thelethon ->sudo -H pip install telethon
3rd. Execute python ./try_telethon.py
4th. If its your first time introduce the verification code sended to your Telegram.
5th. You'll see all chats, to export users introduce the Chat number and then !get
![[Image: ?url=http%3A%2F%2Fi.imgur.com%2FmQU1YOi.png]](https://cache.nulledcdn.com/c0e93fb69002269c98b71ad62d75a89a2dccb6a2/?url=http%3A%2F%2Fi.imgur.com%2FmQU1YOi.png)
The program creates a excel.txt file that have all users in csv format.
Example:
![[Image: ?url=http%3A%2F%2Fi.imgur.com%2FmdOGPs2.png]](https://cache.nulledcdn.com/88905eb5a613865d7403e2f8a6696778c61e0a26/?url=http%3A%2F%2Fi.imgur.com%2FmdOGPs2.png)
6th. Now you can send a message to all this users, to do it modify this line, ininteractive_telegram_client.py inside thetelethon_examples folder:
![[Image: ?url=http%3A%2F%2Fi.imgur.com%2F9PPjzQt.png]](https://cache.nulledcdn.com/2f5707bb37844f4119976061c06ce0bb26fdb37b/?url=http%3A%2F%2Fi.imgur.com%2F9PPjzQt.png)
7th. Enter in a random group and send !enviar command to send this message ^_^
Tips:
API 'll block you temporally if you send a lot messages per minute.
Some users can Report your messages as Spam, and it'll block you too.
Download:
Download here: https://goo.gl/JynVWZ
I hope you like this!
I hope is usefull for all u.
I used: Telethon - https://github.com/LonamiWebs/Telethon
1st. Create an API app here: https://my.telegram.org/apps and put your credentials on /api/settings file
2nd. Install Thelethon ->sudo -H pip install telethon
3rd. Execute python ./try_telethon.py
4th. If its your first time introduce the verification code sended to your Telegram.
5th. You'll see all chats, to export users introduce the Chat number and then !get
![[Image: ?url=http%3A%2F%2Fi.imgur.com%2FmQU1YOi.png]](https://cache.nulledcdn.com/c0e93fb69002269c98b71ad62d75a89a2dccb6a2/?url=http%3A%2F%2Fi.imgur.com%2FmQU1YOi.png)
The program creates a excel.txt file that have all users in csv format.
Example:
![[Image: ?url=http%3A%2F%2Fi.imgur.com%2FmdOGPs2.png]](https://cache.nulledcdn.com/88905eb5a613865d7403e2f8a6696778c61e0a26/?url=http%3A%2F%2Fi.imgur.com%2FmdOGPs2.png)
6th. Now you can send a message to all this users, to do it modify this line, ininteractive_telegram_client.py inside thetelethon_examples folder:
![[Image: ?url=http%3A%2F%2Fi.imgur.com%2F9PPjzQt.png]](https://cache.nulledcdn.com/2f5707bb37844f4119976061c06ce0bb26fdb37b/?url=http%3A%2F%2Fi.imgur.com%2F9PPjzQt.png)
7th. Enter in a random group and send !enviar command to send this message ^_^
Tips:
API 'll block you temporally if you send a lot messages per minute.
Some users can Report your messages as Spam, and it'll block you too.
Download:
Download here: https://goo.gl/JynVWZ
I hope you like this!