← 返回
未分类 中文

Telegram Group Chat

Manages Telegram group chat replies by responding to @mentions, questions, name calls, technical topics, or priority users while preventing spam and bot loops.
管理 Telegram 群组回复:响应 @提及、问题、名字呼叫、技术话题或优先用户,同时防止垃圾信息和机器人循环。
zboxman zboxman 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 370
下载
💾 5
安装
1
版本
#latest

概述

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 botsfrom.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

MessageShould Reply?Reason
-------------------------------
"@Echo 怎么配置 Telegram bot?"✅ Yes@mention + question
"有人知道 API 怎么调吗?"✅ YesQuestion + technical
"Echo 你觉得呢?"✅ YesCalled by name
"早安大家"❌ NoSmall talk without @
"👍"❌ NoOnly emoji
"好"❌ NoToo short
(Bot message) "Welcome!"❌ NoFrom other bot
"刚才那个问题还有人吗?"❌ NoReplied 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

  • [ ] @mention triggers reply
  • [ ] Questions trigger reply
  • [ ] Emoji-only messages skipped
  • [ ] Other bot messages skipped
  • [ ] Cooldown prevents spam
  • [ ] NO_REPLY not sent to chat

Related

  • OpenClaw Telegram channel docs: ~/.npm-global/lib/node_modules/openclaw/docs/channels/telegram.md
  • NO_REPLY pattern: Built into OpenClaw gateway

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 08:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,176 📥 946,625
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 874 📥 350,997
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,528 📥 583,153