Whether you’re using WhatsApp, Telegram, Discord, or Slack, you might prefer a group chat approach where Moltbot responds without needing an explicit tag such as @moltbot. In this article, we explain how to achieve this using per-group activation commands or by editing your global/default configuration.
無論您使用的是 WhatsApp、Telegram、Discord 還是 Slack,您都可能會偏好群組聊天的方式,讓 Moltbot 不再需要明確的標籤(例如 @moltbot)即可回應。本文將說明如何透過每個群組的啟動命令或編輯全域/預設配置來實現這個目標。
1. Introduction
By default, Moltbot is set to require a mention (or tag) in group chats. Switching from the default 「mention」 mode to 「always」 mode tells the bot to wake up and consider replying on every message in the group—even when it’s not explicitly called out. This feature is available on most supported platforms, though the exact configuration keys can vary slightly by channel.
預設情況下,Moltbot 在群組聊天中需要透過提及(或標籤)才能觸發回應。將模式從預設的 「mention」 切換到 「always」 模式,即表示通知機器人即使在未被明確呼叫時,也要喚醒並考慮對群組中的每一條訊息進行回應。這項功能適用於大多數支援的平台,但具體的配置鍵可能會因通道略有不同。
2. Per-Group Activation Command (Easiest & Safest)
The simplest and safest method is to use the per‑group activation command. As the owner (you), simply go into the group chat where Moltbot is present and send one of the following commands:
- /activation always
→ The bot now listens and may respond to every message in this group (no tag required). - /activation mention
→ Restores the default behavior where @mentions or name pings are required.
This command is owner-only and overrides any global or default configuration for that group. After sending /activation always, send a normal message without a tag to verify the bot responds. Note that while the bot will now consider every message in its group session, it still follows its system prompt and aims to reply only when it adds value (or remains silent internally with a 「NO_REPLY」 if the content isn’t helpful).
最簡單且最安全的方法是使用每個群組的啟動命令。作為擁有者(您),只需進入 Moltbot 已加入的群組,然後直接在群組中發送以下命令之一:
- /activation always
→ 執行後,機器人將開始監聽該群組中的所有訊息並可能回應(不再需要標籤)。 - /activation mention
→ 恢復預設行為,即需要使用 @標記或呼叫名字才能觸發回應。
此命令只允許擁有者使用,並且僅針對當前群組覆蓋全域或預設配置。發送 /activation always 後,再發送一條普通訊息(不加標籤)以確認機器人是否正確回應。請注意,儘管機器人現在會對所有訊息進行考量,但它仍遵循群組行為的系統提示——僅在認為回應有價值時才會回覆(否則內部將以 「NO_REPLY」 保持沉默)。
3. Global/Default Configuration
If you’d like Moltbot to use the 「always」 mode by default for all or new group chats, you can edit your configuration file (typically located at ~/.moltbot/moltbot.json or ~/.clawdbot/moltbot.json). For example, for WhatsApp you can use one of these configuration blocks:
Using the requireMention flag
{
"channels": {
"whatsapp": {
"groups": {
"*": { // "*" means all groups (or list specific group JIDs)
"requireMention": false
}
}
}
}
}
Setting the Activation Mode Explicitly (newer versions)
{
"channels": {
"whatsapp": {
"groups": {
"*": {
"activation": "always" // Options: "always" or "mention"
}
}
}
}
}
For Telegram groups, you might use a similar configuration:
{
"channels": {
"telegram": {
"groups": {
"*": {
"requireMention": false
}
}
}
}
}
After editing the config file, restart Moltbot (or reload the configuration if your version supports hot-reload). Keep in mind that if you use the channels.<platform>.groups section, it often acts as an allowlist—so include "*" to cover all groups or list specific group IDs/usernames.
如果您希望 Moltbot 對所有或新加入的群組自動使用 「always」 模式,可以編輯您的配置文件(通常位於 ~/.moltbot/moltbot.json 或 ~/.clawdbot/moltbot.json,若不存在則請創建)。例如,針對 WhatsApp,您可以使用以下其中一個配置區塊:
使用 requireMention 標記
{
"channels": {
"whatsapp": {
"groups": {
"*": { // "*" 表示所有群組(或可以列出特定的群組 JID)
"requireMention": false
}
}
}
}
}
明確設定啟動模式(新版支持此格式)
{
"channels": {
"whatsapp": {
"groups": {
"*": {
"activation": "always" // 可選項:"always" 或 "mention"
}
}
}
}
}
如果使用 Telegram 群組,同樣的配置也適用:
{
"channels": {
"telegram": {
"groups": {
"*": {
"requireMention": false
}
}
}
}
}
編輯完成後,請重啟 Moltbot(或如果版本支持熱重載,則重新載入配置)。請注意,使用 channels.<platform>.groups 區塊時,通常會充當允許名單——您可以使用 "*" 來涵蓋所有群組,或僅列出特定的群組 ID/用戶名。
4. Important Warnings
- Privacy/Security: In 「always」 mode, Moltbot sees every message in the group. Do not add it to groups with individuals you do not fully trust since it has access to your connected tools (such as your calendar, emails, or files). An overly permissive configuration might result in accidental data leaks.
- Noise: The bot might end up replying more often than desired. Adjust the agent’s group prompt (via the configuration in AGENTS.md or your agent settings) so that it remains concise and only replies when the content is relevant and useful.
- Allowlist: Make sure the group is permitted via the
allowFrom,groupAllowFrom, or the groups allowlist settings; otherwise, Moltbot might ignore every message. - Platform Differences:
- WhatsApp: Uses real @‑mentions or regex patterns (configurable via
mentionPatterns). - Telegram/Discord: May require additional privacy settings adjustments (e.g., in BotFather for Telegram) so that the bot can see all messages.
- WhatsApp: Uses real @‑mentions or regex patterns (configurable via
If the bot still fails to appear to reply, verify your configuration by checking the logs or running diagnostic commands such as moltbot status or moltbot doctor.
- 隱私/安全: 在 「always」 模式下,Moltbot 將會看到群組中的所有訊息。請不要將它加入您不完全信任的人所在的群組,因為它能夠存取您所連接的工具(例如日曆、電子郵件或文件)。過於寬鬆的配置可能會導致訊息意外洩露。
- 訊息噪音: 機器人可能會比預期回覆更多訊息。請根據需要調整 agent 的群組提示(可以在 AGENTS.md 或 agent 配置中調整),使其保持簡潔,僅在內容相關且有用時回覆。
- 允許名單: 確保群組已通過
allowFrom、groupAllowFrom或群組允許名單設置進行允許,否則 Moltbot 可能會忽略所有訊息。 - 平台差異:
- WhatsApp: 使用真正的 @提及 或正則表達式(可透過
mentionPatterns進行配置)。 - Telegram/Discord: 可能需要調整額外的隱私設置(例如在 Telegram 的 BotFather 中),以確保機器人可以看到所有訊息。
- WhatsApp: 使用真正的 @提及 或正則表達式(可透過
如果配置後機器人仍未回覆,請檢查日誌或執行如 moltbot status 或 moltbot doctor 的診斷命令來確認問題所在。

沒有評論