Telegram bot for get top N posts and video by likes and viewsfrom instagram account
- Create own telegram bot. Manual: https://core.telegram.org/bots
- Insert your bot token to config.yml.
- Register on https://chatbase.com/ for storing bot usage statistics and insert chatbase token
- Install requirements.
- Run main.py.
python3 main.py
If you want to run this bot on the server, you can run:
nohup python3 main.py & tail -f nohup.out
- Sign up on pythonanywhere.com.
- Upload files to server.
git clone https://github.com/lbulygin/telegram-top-posts-bot
- Add always-on task:
python3 /home/{YOUR_USERNAME}/telegram-top-posts-bot/main.py
- Add daily scheduled task for purging messages limits:
rm -rf /home/{YOUR_USERNAME}/telegram-top-posts/db_users_limits.json
This bot saves usernames and their chat_id to db_users.json for sending messages.
Users have messages limits in config.yml (messages_limit parameter). Limits are stored in db_users_limits.json.
You can send a message to all your users with this command:
python3 mailing_users.py --message "YOUR MESSAGE"
Same as there: https://github.com/lbulygin/telegram-saver-bot