A powerful, modular Telegram bot built with Python & Telethon.
This bot packs three core features: OpenAI integration, YouTube downloader, and Wikipedia search — all through simple Telegram commands.
Chat with an AI powered by OpenAI's GPT model directly in Telegram.
Use it for quick answers, code help, ideas, or just fun convos.
Command Example:
/ask What is the difference between Docker and a virtual machine?
Download YouTube videos as MP3 files and receive them straight in your chat.
Command Example:
/download a <youtube-url> # For only audio
/download v <youtube-url> # For video download
Search Wikipedia and get summarized answers directly in Telegram.
Command Example:
/wiki Elon Musk
git clone https://github.com/amitkumar0128/telegram_bot.git
cd telegram_botsudo apt install python3-venv # for ubuntu
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtConfigure .env file in the project root:
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
BOT_TOKEN=your_bot_token
OPENAI_API_KEY=your_openai_api_key
BOT_USERNAME=your_bot_username
📌 You can get your API ID and hash from https://my.telegram.org and your bot token from @BotFather.
cd ..
python3 -m telegram_bottelegram_bot/
├── plugins/ # Plugin files: chatgpt, yt.dl, wiki
│ ├── chatgpt.py
│ ├── start.py
│ ├── wiki.py
│ └── yt.dl.py
├── utils/ # Plugin loader
├── __init__.py # Bot initialization
├── __main__.py # Main entry point
├── .env # Environment variables
├── requirements.txt
└── README.md
Pull requests are welcome. For major changes, please open an issue first to discuss what you’d like to change.
This bot is for educational purposes only. Download responsibly and respect copyright laws.
GPL-3.0 License




