Telegram Group Chat
by @zboxman
Manages Telegram group chat replies by responding to @mentions, questions, name calls, technical topics, or priority users while preventing spam and bot loops.
clawhub install telegram-group-chatš About This Skill
name: telegram-group-chat description: Smart group chat reply logic for Telegram. Use when managing Telegram group interactions to avoid spam while staying helpful. Triggers on: group message handling, Telegram bot configuration, reply policy setup, multi-bot group chats, @mention handling, avoiding bot loops.
Telegram Group Chat - Smart Reply Logic
This skill provides intelligent reply judgment for Telegram group chats. The goal: be helpful without spamming ā reply when valuable, stay silent when unnecessary.
Core Principle
Quality > Quantity. If you wouldn't send it in a real group chat with friends, don't send it.
Reply Judgment Rules
ā Respond When (ANY one)
1. @mentioned ā Must reply when @mentioned by username
2. Questions detected ā Message contains ? ļ¼ or question words:
- Chinese: ä»ä¹/ęä¹/äøŗä»ä¹/å¦ä½/åŖé/č°
- English: what/how/why/where/who/which/when
3. Called by name ā Message contains your name (e.g., "Echo")
4. Technical topics ā You can help with: code, api, config, error, bug, deploy, bot, openclaw, telegram, webhook, token
5. Priority user ā Messages from configured priority users (e.g., your human)
ā Skip Reply When (ANY one)
1. Other bots ā from.is_bot == true (avoids bot infinite loops)
2. Only emoji ā No text content, just emoji
3. Too short ā <3 Chinese characters OR <1 English word
4. Small talk ā Without @: ę©å®/ęå®/åäŗå/hello/hi/hey/good morning
5. Cooldown active ā Same topic replied within 5 minutes
Implementation: NO_REPLY Mechanism
When skipping a reply, respond with ONLY:
NO_REPLY
OpenClaw treats this as a silent ack ā the message is processed but not sent to the chat.
Important: NO_REPLY must be your ENTIRE response. Never append it to actual replies.
Configuration Template
Add to your AGENTS.md or workspace config:
### š¬ Group Chat Reply Rules (Telegram: YOUR_GROUP_ID)Respond when (any one):
@mentioned (must reply)
Message contains questions (? ļ¼ or ä»ä¹/ęä¹/äøŗä»ä¹/how/what/why)
Called by name: "YourName"
Technical topics (code, api, config, error, bug, bot, openclaw, telegram)
Messages from priority user USER_ID Skip reply when (any one):
From other bots (from.is_bot == true)
Only emoji, no text
Too short (<3 Chinese chars or <1 English word)
Small talk without @ (ę©å®/ęå®/åäŗå/hello/hi)
Same topic replied within 5 minutes (cooldown) Silent reply: When skipping, respond with ONLY NO_REPLY
Example Scenarios
| Message | Should Reply? | Reason | |---------|--------------|--------| | "@Echo ęä¹é ē½® Telegram bot?" | ā Yes | @mention + question | | "ęäŗŗē„é API ęä¹č°åļ¼" | ā Yes | Question + technical | | "Echo ä½ č§å¾å¢ļ¼" | ā Yes | Called by name | | "ę©å®å¤§å®¶" | ā No | Small talk without @ | | "š" | ā No | Only emoji | | "儽" | ā No | Too short | | (Bot message) "Welcome!" | ā No | From other bot | | "åęé£äøŖé®é¢čæęäŗŗåļ¼" | ā No | Replied 3min ago (cooldown) |
Multi-Bot Groups
When multiple OpenClaw bots are in the same group:
1. Each bot needs independent config ā Same rules, different instances 2. Avoid bot loops ā Never reply to other bots' messages 3. Use @ for directed questions ā "@BotA å @BotB ä½ ä»¬č§å¾å¢ļ¼" 4. Stagger responses ā If multiple bots could reply, let the most relevant one respond
Testing Checklist
NO_REPLY not sent to chatRelated
~/.npm-global/lib/node_modules/openclaw/docs/channels/telegram.md