An interactive Telegram bot built using Python, Telebot, and PyTube to download YouTube videos based on user-provided links.
- Downloads YouTube videos when users provide valid video links.
- Sends downloaded videos back to users in Telegram chat.
- Automatically sends an introductory message when users start a chat with the bot.
In order to use this code you will need to create a new telegram bot model using @BotFather.
Find @BotFather in your Telegram and type /newbot - follow the simple instructions.
To run this bot locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/anzor-telegram-bot.git -
Create a
.envfile in the root directory and add your Telegram Bot token:BOT_TOKEN=your_telegram_bot_token
-
Run the bot:
python3 bot.py
-
Start downloading with the bot by searching for it on Telegram as "AnzDev" and clicking "Start" or create your own using Installation section above.
-
Send a YouTube video link in the chat.
-
The bot will download the video and send it back to you in the chat.
- /start: Start the bot and receive an introductory message.
- /hello: Get a greeting message from the bot.
The bot uses the following APIs and libraries:
- Telebot: A Python library for building Telegram bots.
- PyTube: A library for downloading YouTube videos.
Make sure to install these dependencies using pip3 install telebot pytube before running the bot.
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue or submit a pull request.
This project is unlicensed.