An advanced, intelligent Telegram AI Chatbot built with Pyrofork, Python 3, and MongoDB. Cobra Chatbot learns conversational patterns directly from your group chats and replies naturally using text and stickers!
- 🧠 Dynamic Auto-Learning: Automatically learns responses and stickers from group interactions.
- 💬 Text & Sticker Support: Can reply with both text messages and animated/static stickers.
- 👥 Group Admin Controls: Enable or disable the chatbot per-group using
/chatbot onand/chatbot off. - ⚡ Optimized MongoDB Connection Pooling: Ultra-fast responses with persistent connection pooling (no connection leaks).
- 🎬 Video/Animation Thumbnail: Supports animated MP4 video thumbnails natively.
- ⚙️ Configurable: Easily configure via
.envfile or environment variables.
| Command | Description |
|---|---|
/start |
Start the bot and view the welcome menu |
/help |
View help guide and available features |
/chatbot on |
Enable Cobra Chatbot in the current group (Admins only) |
/chatbot off |
Disable Cobra Chatbot in the current group (Admins only) |
/chatbot |
Check chatbot status and usage guide |
/ping |
Check bot latency and responsiveness |
-
Clone repository:
git clone https://github.com/your-repo/Cobra_chatbot.git cd Cobra_chatbot -
Install dependencies:
pip install -r requirements.txt
-
Configure Environment: Copy
.env.exampleto.envand fill in your values:API_ID=your_api_id API_HASH=your_api_hash BOT_TOKEN=your_bot_token MONGO_URL=your_mongodb_connection_string
-
Run the bot:
python main.py
Released under the GNU General Public License v3.0.