Skip to content

🐛 Telegram Bot uses deprecated parse_mode: "Markdown" instead of "MarkdownV2" #311

@YuriNachos

Description

@YuriNachos

GitHub Issue: Telegram Markdown Formatting Bug

Title

🐛 Telegram Bot uses deprecated parse_mode: "Markdown" instead of "MarkdownV2"

Description

Clawdbot sends messages to Telegram using the deprecated parse_mode: "Markdown" (line 730 in src/telegram/bot.ts), which Telegram has deactivated. This causes:

  1. First attempt: Fails with error "Can't parse entities"
  2. Automatic retry: Sends plain text without formatting
  3. Result: Users see raw Markdown syntax (##, **, etc.) instead of formatted text

Current Behavior

// src/telegram/bot.ts:730
parse_mode: "Markdown",

When sending formatted messages like:

  • ## Heading
  • **bold**
  • *italic*

Telegram throws:

400 Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 1222

Then Clawdbot falls back to plain text, and users see the raw Markdown.

Expected Behavior

Use "MarkdownV2" or "HTML" for proper formatting support.

Steps to Reproduce

  1. Send a message to Clawdbot that will generate formatted output
  2. Wait for the response
  3. Observe raw Markdown syntax in Telegram (e.g., ##, **, etc.)

Environment

  • Clawdbot version: 2026.1.5-3
  • File: src/telegram/bot.ts (line 730)
  • Telegram Bot API: requires MarkdownV2 or HTML

Suggested Fix

// Option 1: Use MarkdownV2
parse_mode: "MarkdownV2",

// Option 2: Use HTML
parse_mode: "HTML",

Note: If switching to MarkdownV2, special characters need proper escaping:

  • _ * [ ] ( ) ~ > # + - = | { } . !`

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions