Updated: Jun 17
Would you be interested on a Telegram bot that can scrape the members of any telegram bot and send messages on each of them?
If yes, in this article and also in the top youtube video I am showing how to do it.
So lets start..
1. You have to download the project from my github repository which you can find on this link: https://github.com/redianmarku/telegram-dm-bot. You can download by clicking in the code icon and in download zip. This will download a zip file of the bot in your computer and all you have to do for now is just to extract it.
2. After extracting, lets install a code editor in our computer. I prefer to use VS Code because is very popular and easy to use. Now we can use VS Code to open our bot, just open the code editor and click on open folder then choose the bot folder that you extracted. Another thing that we need is terminal where we can run commands. In VS Code click on terminal/new terminal in the menu.
3. Now lets setup the bot by running the setup python file of the bot in terminal. To run the installation first we have to type on terminal "python setup.py -i". The press "n" for now and enter. After installing requirements now we have to create a telegram api id and hash.
4. To create these you have to go to https://my.telegram.org/auth and register with your phone number. In this page we have to create a new app and copy api id and hash.
5. In terminal run "python setup.py -c" and paste your api id and api hash. After all this process is finished we just have to run the bots. The first bot we have to run is the scraper that it is going to scrape members of any group in your telegram.
6. To run the scraper type this command in terminal: "python scraper.py" it is going to ask you which group you want to scrape the members from and after it is finished you will see a memebers.csv file in the bot folder.
7. Now is the time to run the sms bot, so to do that just go ahead and run this command on terminal: "python smsbot.py members.csv". Now the bot will send a message you want to all members from the csv list and it will wait 120 seconds between each message sent.
Ok people, that was it I hope this article was helpful. If you are having troubles during this process you can follow my youtube video for better understanding. Thank you!