# Telegram events and operations

> Reaction notifications, config writes from Telegram events, and error reply policy

- 网址：https://funcoding.ai/agents/openclaw/channels/telegram/events/
- 来源：OpenClaw 官方文档原文（英文），MIT 许可，同步于 2026-11-28
- 官方原文：https://docs.openclaw.ai/zh-CN/channels/telegram/events

---
Operational Telegram surfaces: reaction wakes, config writes, and what the bot says when something fails.

## Events and operations

<details>
<summary>Reaction notifications</summary>

Telegram reactions arrive as `message_reaction` updates, separate from message payloads. When enabled, OpenClaw enqueues system events like `Telegram reaction added: 👍 by Alice (@alice) on msg 42`. Custom emoji are reported as `custom emoji <id>`; paid reactions are ignored.

- `channels.telegram.reactionNotifications`: `off | own | all` (default: `own`)
- `channels.telegram.reactionLevel`: `off | ack | minimal | extensive` (default: `minimal`)

`own` means user reactions to bot-sent messages only (best-effort via a sent-message cache). Reaction events still respect Telegram access controls (`dmPolicy`, `allowFrom`, `groupPolicy`, `groupAllowFrom`); unauthorized senders are dropped.

Telegram does not provide topic metadata in reaction updates. Ordinary non-forum groups remain chat-scoped. Forum, channel Direct Messages, and private-chat topic reactions recover the originating topic from OpenClaw's bounded message cache (keyed by account, chat, and message ID), so topic config, topic agents, and conversation bindings still apply. Forum and channel Direct Messages reactions are skipped with a warning if the cached topic is missing or belongs to the wrong scope. A private-chat reaction without a cached topic remains on the base DM session; with `requireTopic`, it is dropped instead.

`allowed_updates` for polling/webhook include `message_reaction` automatically.

</details>

<details>
<summary>Config writes from Telegram events and commands</summary>

    Channel config writes are enabled by default (`configWrites !== false`). Telegram-triggered writes include group migration events (`migrate_to_chat_id`, updates `channels.telegram.groups`) and `/config set` / `/config unset` (requires command enablement).

    Disable:

```json5
{
  channels: {
    telegram: {
      configWrites: false,
    },
  },
}
```

</details>

## Error reply controls

When the agent hits a delivery or provider error, the error policy controls whether error messages reach the Telegram chat:

| Key                             | Values                     | Default  | Description                                                                                                                                                                |
| ------------------------------- | -------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `channels.telegram.errorPolicy` | `always`, `once`, `silent` | `always` | `always` sends every error message to the chat. `once` sends each unique error message once per built-in cooldown window. `silent` never sends error messages to the chat. |

Per-account, per-group, and per-topic overrides are supported (same inheritance as other Telegram config keys).

If a gateway restart interrupts a reply saved for recovery, Telegram says “Restarting. I'll finish this reply when I'm back.” You don't need to resend the request. If delivery fails and the reply wasn't saved, Telegram still asks you to ask again.

```json5
{
  channels: {
    telegram: {
      errorPolicy: "always",
      groups: {
        "-1001234567890": {
          errorPolicy: "silent", // suppress errors in this group
        },
      },
    },
  },
}
```
