A simple Telegram bot example using python-telegram-bot library
First, clone this repo:
git clone https://github.com/ozansz/simple-telegram-bot
cd simple-telegram-bot
To run the bot, change the "BOT TOKEN"
string in the line #57 with the token of your bot. Then just run the deploy.sh
script. The script will install all dependencies and then start the bot.
chmod +x deploy.sh
./deploy.sh
Or you can just run the bot.py
script itself:
python3 bot.py
You can toggle extra debug messages through the DEBUG
variable in bot.py
file.
DEBUG = 0
means no extra debug messages will be printed.
Starts the initial dialog with the bot.
Shows help message which contains information about bot commands.
Sends the user a video from Youtube's trend videos randomly.
Send user a news from BBC's most read news