-
-
Notifications
You must be signed in to change notification settings - Fork 68.7k
🐛 Telegram Bot uses deprecated parse_mode: "Markdown" instead of "MarkdownV2" #311
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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:
- First attempt: Fails with error "Can't parse entities"
- Automatic retry: Sends plain text without formatting
- 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
- Send a message to Clawdbot that will generate formatted output
- Wait for the response
- 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
MarkdownV2orHTML
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.