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