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)
-
Clone the repository:
git clone https://github.com/yourname/tg-mem-bot.git cd tg-mem-bot -
Create virtual environment & install dependencies:
python -m venv .venv source .venv/bin/activate # Linux/Mac .venv\Scripts\activate # Windows pip install -r requirements.txt
-
Create
.envfile:TOKEN_TG=your_telegram_bot_token
-
Run:
python TG_mem_bot.py
TOKEN_TG— Telegram bot token from BotFatherG4F_TEXT_TIMEOUT— text generation timeout (sec), default15G4F_IMAGE_TIMEOUT— image generation timeout (sec), default20
/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
- Connect repository to Railway.
- Add Variables:
TOKEN_TG=your_telegram_bot_token - Deploy → Bot is live in Telegram 🚀
MIT
Minor change for author test