This bot will announce new post
every day from:
This info is being sent to your Telegram
account.
OS: Ubuntu20.04
Python: 3.8
VPS: 1core-1GB ram (optional)
First, git clone this repo and set up environment:
git clone https://github.com/lynguyenminh/uit_daily_news_bot.git && cd uit_daily_news_bot
Then, create virtualenv:
virtualenv venv && source venv/bin/activate
pip install -r requirements.txt
Search BotFather
and do the following, your bot id is the one I blurred:
Search userinfobot
and type /start
Then fill bot id
and account id
into send_telegram.py
I schedule it run one time per day at 1.am
. To do it, i use crontab
.On Ubuntu, open crontab by crontab -e
.
Then write this script:
0 1 * * * /usr/bin/env bash -c 'cd /root/uit_daily_news_bot && sh /root/uit_daily_news_bot/run.sh'
Please check 2 tutorials below: add bot to the group and get the group id.
If this code has any errors, please create issue or contact me by email: 20521592@gm.uit.edu.vn