Skip to content

Latest commit

 

History

History
82 lines (57 loc) · 1.8 KB

File metadata and controls

82 lines (57 loc) · 1.8 KB

TG Mem Bot 🎭

Python Telegram Deploy

Telegram meme-generator bot built with aiogram v3 and g4f.

Features:

  • 📸 Generate memes based on a given topic
  • 🧩 Maintain conversational context with memory
  • 📝 Support different roles (response styles)

🚀 Installation & Run

  1. Clone the repository:

    git clone https://github.com/yourname/tg-mem-bot.git
    cd tg-mem-bot
  2. Create virtual environment & install dependencies:

    python -m venv .venv
    source .venv/bin/activate   # Linux/Mac
    .venv\Scripts\activate      # Windows
    
    pip install -r requirements.txt
  3. Create .env file:

    TOKEN_TG=your_telegram_bot_token
  4. Run:

    python TG_mem_bot.py

⚙️ Environment Variables

  • TOKEN_TG — Telegram bot token from BotFather
  • G4F_TEXT_TIMEOUT — text generation timeout (sec), default 15
  • G4F_IMAGE_TIMEOUT — image generation timeout (sec), default 20

📖 Commands

  • /start — start bot
  • /help — show help
  • /clear — clear memory

Text commands:

  • Общение: <topic> — set topic for dialog (with memory)
  • Роль: <role> — set system role (response style)
  • Мем: <topic> — generate meme with caption & image

🛠 Deploy on Railway

  1. Connect repository to Railway.
  2. Add Variables:
    TOKEN_TG=your_telegram_bot_token
    
  3. Deploy → Bot is live in Telegram 🚀

📜 License

MIT

Minor change for author test