Telegram group bot that assigns funny context-aware member tags with Kimi K2.6 Turbo via F
https://t.me/tag_smart_bot
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Nixpacks gets Bun from nixpkgs, which only has 1.3.13 at our pin, so the setup phase points nixpkgs' bun package at the official 1.4.4 release zip (hash pinned). Remove the override once nixpkgs has bun >= 1.4.4. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .github | ||
| assets | ||
| src | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| bun.lockb | ||
| nixpacks.toml | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Tag Smart Bot
Telegram group bot that watches group chat messages and periodically asks an OpenAI-compatible LLM provider to assign funny context-aware member tags.
Bot: @tag_smart_bot
What It Does
- Stores message context separately per Telegram group.
- Recalculates tags automatically every ~100 text messages by default.
- Uses OpenRouter free models, with fallback across configured models, for context-aware tag suggestions.
- Matches tag language and script to the chat's dominant language.
- Updates Telegram member tags through the Bot API when the bot has admin rights.
Telegram Setup
This is the same setup shown by /start and /help in the bot.
- Add the bot to a group.
- Promote it to admin with the right to change member tags.
- Send
/start,/help, or/retagin the group to verify setup.
Messages and tags never mix between groups.
Environment
Copy .env.example to .env locally, or set these variables in Easypanel:
TELEGRAM_BOT_TOKENLLM_API_KEYLLM_BASE_URLLLM_MODELor comma-separatedLLM_MODELSDATABASE_PATHMESSAGES_PER_RETAGMAX_CONTEXT_MESSAGESMAX_TAG_CHANGES_PER_RUNTAG_MAX_LENGTH
Keep DATABASE_PATH on a persistent Easypanel volume, for example /app/data/member-tags.sqlite.
Legacy FIREWORKS_API_KEY, FIREWORKS_BASE_URL, FIREWORKS_MODEL, and comma-separated FIREWORKS_MODELS are still supported for existing deployments.
Development
bun install
bun test
bun run typecheck
bun run start
Deployment
Use Nixpacks on Hetzner Easypanel. Set the env vars above in Easypanel and mount a persistent data volume at /app/data.