Thanks to visit codestin.com
Credit goes to github.com

Skip to content

swadhinbiswas/AIBOT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AIBOT [BETA]

The Professor Bot - An advanced, versatile AI-powered Telegram bot built with Pyrogram

Python Pyrogram License

🌟 Features Overview

🎨 Creative & AI Tools

  • πŸ–ΌοΈ AI Image Generation - Convert text descriptions into stunning images using AI
  • πŸ’¬ AI Chatbot - Powered by Google Gemma via Cloudflare AI
  • πŸ˜‚ Meme Creation - Create custom memes (In Development)

πŸ”§ Utility Tools

  • πŸ”— QR Code Generator - Generate QR codes for any URL with custom icons
  • πŸ“ URL Shortener - Shorten long URLs for easy sharing
  • πŸ” Text Encryption/Decryption - Secure your text with encryption
  • πŸ“‘ Morse Code Converter - Convert text to/from Morse code
  • 🌍 IP Tracker - Get detailed information about IP addresses
  • πŸ” Domain Lookup - Comprehensive domain information and analysis

πŸ“± Media & Downloads

  • 🐦 Twitter Video Downloader - Download videos from Twitter/X
  • πŸ“„ Website to PDF - Convert any webpage to PDF
  • πŸ“Έ URL to Image - Generate screenshots of websites

πŸ”§ Development Features

  • πŸ”’ Secure Configuration - Environment-based settings with .env support
  • πŸ“ Comprehensive Logging - Detailed logging for debugging
  • 🐳 Docker Support - Easy deployment with Docker
  • 🎯 Modular Architecture - Clean, maintainable code structure

πŸ“‹ Implementation Status

βœ… Fully Implemented

AI & Creative

  • βœ… AI Image Generation - Text to image using Pollinations AI
  • βœ… AI Chatbot - Google Gemma 7B via Cloudflare AI
  • βœ… Text Analysis - Smart text processing and responses

Utility Tools

  • βœ… QR Code Generator - Custom QR codes with domain-specific icons
  • βœ… URL Shortener - Link shortening service
  • βœ… Text Encryption/Decryption - Secure text encryption
  • βœ… Morse Code Converter - Text ↔ Morse code conversion
  • βœ… IP Tracker - Detailed IP geolocation and information
  • βœ… Domain Lookup - WHOIS and domain analysis

Media & Downloads

  • βœ… Twitter Video Downloader - Download Twitter/X videos
  • βœ… Website to PDF - Convert webpages to PDF
  • βœ… URL to Screenshot - Generate website screenshots

Core Features

  • βœ… Telegram Integration - Full Pyrogram bot implementation
  • βœ… Error Handling - Comprehensive error management
  • βœ… Logging System - Detailed logging for debugging
  • βœ… Docker Support - Containerized deployment

🚧 In Development

  • 🚧 Meme Generation - Custom meme creation
  • 🚧 Text Translation - Multi-language translation
  • 🚧 Audio Processing - Text ↔ Audio conversion
  • 🚧 Video to GIF - Video format conversion
  • 🚧 Speed Test - Internet speed testing
  • 🚧 Instagram Downloader - Instagram media downloads

πŸ“‹ Planned Features

  • πŸ“‹ PDF Operations - Unlock, merge, convert PDF files
  • πŸ“‹ File Encryption - Encrypt/decrypt files
  • πŸ“‹ Face Search - Facial recognition capabilities
  • πŸ“‹ OCR (Image to Text) - Extract text from images
  • πŸ“‹ Email Search - Find emails across the internet
  • πŸ“‹ Torrent Tracker - Track torrent downloads

🎯 Available Commands

Basic Commands

/start          - Start the bot and see welcome message
/help           - Display all available commands

AI & Creative

/imagine <text>     - Generate AI image from text description
/img <text>         - Alternative image generation command

Utility Tools

/qrcode <url>       - Generate QR code for URL
/urlshortner <url>  - Shorten long URLs
/encrypt <text>     - Encrypt text securely
/decrypt <text>     - Decrypt encrypted text
/morsecode <text>   - Convert text to Morse code
/iptack <ip>        - Track and analyze IP address
/dominlookup <domain> - Get domain information
/webtopdf <url>     - Convert webpage to PDF
/urltoimage <url>   - Generate website screenshot

Media & Downloads

/twitter <url>      - Download Twitter/X videos

Development Commands

/see               - Get photo file ID (for developers)

Note: Any text message not starting with / will be processed by the AI chatbot.

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • Telegram Bot Token (from @BotFather)
  • API Keys for various services (see Configuration section)

Installation

  1. Clone the repository:

    git clone https://github.com/swadhinbiswas/AIBOT.git
    cd AIBOT
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up environment variables: Create a .env file in the root directory with the following:

    # Required - Telegram Bot Configuration
    TELEGRAM_BOT_TOKEN=your_bot_token_here
    TELEGRAM_API_KEY=your_api_id_here
    TELEGRAM_HASH=your_api_hash_here
    
    # Required - AI Features
    CLOUDFLARE_API_KEY=your_cloudflare_api_key
    CLOUDFLARE_ID=your_cloudflare_account_id
    GEMINI_API_KEY=your_gemini_api_key
    
    # Optional - Additional Features
    SCREENSHOT_API_KEY=your_screenshot_api_key
    HTMLTOPDF_API_KEY=your_pdf_api_key
    HOSTIO=your_hostio_api_key
  4. Run the bot:

    python main.py

Docker Deployment

  1. Build the Docker image:

    docker build -t aibot .
  2. Run with environment file:

    docker run -d --env-file .env --name aibot-container aibot

πŸ”§ Configuration

Required API Keys

Service Purpose Required How to Get
Telegram Bot Core bot functionality βœ… Yes @BotFather
Telegram API Pyrogram client βœ… Yes my.telegram.org
Cloudflare AI AI chatbot & image generation βœ… Yes Cloudflare Dashboard

Optional API Keys

Service Purpose Required How to Get
Google Gemini Enhanced AI features ⚠️ Optional Google AI Studio
Screenshot API Website screenshots ⚠️ Optional Various providers
HTML to PDF PDF conversion ⚠️ Optional Various providers
HostIO Domain lookup ⚠️ Optional Host.io

Project Structure

AIBOT/
β”œβ”€β”€ Bot/
β”‚   β”œβ”€β”€ API/                  # External API integrations
β”‚   β”‚   β”œβ”€β”€ aiimage.py       # AI image generation
β”‚   β”‚   β”œβ”€β”€ texttotext.py    # AI chatbot
β”‚   β”‚   β”œβ”€β”€ encrypttext.py   # Text encryption
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ BotFunction/         # Bot utilities
β”‚   β”‚   β”œβ”€β”€ helper.py        # Message templates
β”‚   β”‚   β”œβ”€β”€ morsecode.py     # Morse code converter
β”‚   β”‚   β”œβ”€β”€ qrcodehelper.py  # QR code generation
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ settings/            # Configuration
β”‚   └── bot.py              # Main bot logic
β”œβ”€β”€ main.py                 # Entry point
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ Dockerfile             # Docker configuration
└── README.md              # This file

πŸ“– Usage Examples

AI Image Generation

/imagine A beautiful sunset over snow-capped mountains
/img Futuristic cityscape with flying cars at night

Utility Commands

/qrcode https://github.com/swadhinbiswas/AIBOT
/urlshortner https://very-long-url-here.com/with/many/parameters
/encrypt "Secret message here"
/iptack 8.8.8.8

Media Downloads

/twitter https://twitter.com/username/status/1234567890
/webtopdf https://example.com

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ž Contact & Support

Developer

Project Links

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ˆ Project Stats

Hits

πŸ“Έ Demo Screenshots

Bot Interface

Bot Interface

Features in Action

AI Image Generation QR Code Generation Utility Commands


Made with ❀️ by Swadhin Biswas

⭐ Star this repository if you found it helpful!

About

An advanced, versatile chatbot enhancing user interactions and automation on Telegram.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages