d979e6a14bbe2f5e781a9b9937ca093073467603
- Split docker-compose into build (docker-compose.build.yaml) and deploy (docker-compose.yaml pulls from registry) - Add push.sh for building and pushing versioned images to git.goyban.com/goyban/bot_meme - Add ADMIN_USERS env var; admins can add/edit/delete, users can search - Add /edit command with inline keyboard to update meme keywords - Add sticker support (save and serve via inline) - Switch /delete to use numeric row ID instead of file_unique_id - Search is now global (shared pool) instead of per-user Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Memes Bot
A personal Telegram inline bot to store and search media (photos, GIFs, videos, voice) by keywords.
Requirements
- A server with Docker installed
- A Telegram bot token from @BotFather
Setup
1. Create the bot in BotFather
/newbot→ get your token/setinline→ enable inline mode, set a placeholder (e.g.Search memes...)
2. Find your Telegram user ID
You need your numeric Telegram user ID to whitelist yourself.
- Easiest: forward any message to @userinfobot — it replies with your ID
- Alternative: open Telegram Web, click your profile, the number in the URL is your ID
- For multiple users: repeat for each person and separate IDs with commas
3. Clone and configure
git clone https://git.goyban.com/goyban/memes_bot
cd memes_bot
cp .env.example .env
Edit .env:
BOT_TOKEN=your_telegram_bot_token_here
ALLOWED_USERS=123456789,987654321
4. Run
docker compose up -d --build
The database will be saved in ./bot_db/media.db.
Usage
Adding media — send the bot a photo, GIF, video, or voice message, then type keywords when prompted (comma-separated or one per message), then /done.
Searching inline — in any chat type @yourbotusername keyword to search and send.
Commands
| Command | Description |
|---|---|
/list |
Show all saved media |
/delete <id> |
Remove an entry (get ID from /list) |
/cancel |
Cancel current add operation |
Moving to another server
The only files you need to transfer are:
.envbot_db/media.db
Description
Languages
Python
97%
Shell
2.1%
Dockerfile
0.9%