Telegram group bot that stores chat history and summarizes recent topics with Kimi K2.6 Tu
https://t.me/chad_summary_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 | ||
Telegram Chat Summarizer
Telegram group bot that stores incoming group messages in a local SQLite database and lets anyone in the group ask a configured OpenAI-compatible LLM for a summary of recent topics.
Bot: @chad_summary_bot
What It Does
- Stores incoming text, captions, and basic media placeholders separately per Telegram group.
- Lets any group member run
/summaryfor the last 24 hours, or pass a window like/summary 7dor/summary 100. - Uses the configured LLM endpoint for concise summaries.
- Streams summaries by editing a plain-text placeholder message.
- Keeps secrets in environment variables, not in git.
Important Telegram limitation: bots can only store messages they receive after being added. The bot needs permission to receive normal group messages.
Telegram Setup
- Create or configure the Telegram bot.
- Allow it to receive normal group messages.
- Add the bot to a group.
- Send
/startor/helpin the group. - After some chat happens, run
/summary.
Environment
Copy .env.example to .env locally, or set these variables in Easypanel:
TELEGRAM_BOT_TOKENLLM_API_KEYLLM_BASE_URLLLM_MODELDATABASE_PATHSUMMARY_DEFAULT_MESSAGESSUMMARY_MAX_MESSAGESAI_TEMPERATUREAI_MAX_TOKENSDISABLE_REASONING(defaults totrue; asks OpenRouter to use low reasoning effort and exclude reasoning tokens, while legacy endpoints receive their native disable-thinking flag. Set tofalseto use the selected model's default reasoning behavior.)
Use a persistent volume for DATABASE_PATH, for example /app/data/chat-summaries.sqlite.
Deployment
Use Nixpacks on Hetzner Easypanel. Set the env vars above in Easypanel and mount a persistent data volume at /app/data.
Development
bun install
bun test
bun run typecheck
bun run start