Reputation: 33
so I try to use Telegram's API to send messages to a group. Sending messages is working, but when I try to send messages with a certain style, for example bold, it just doesn't work.
My example message is: "* hello send help *". It should look something like this: hello send help, but it just sends the literal (i.e the * shows in the message and it is not bold)
here's the code: `
payload = {"parseMode": "MarkdownV2", "chat_id": chat_id, "text": "*Send help*"}
requests.post(f"https://api.telegram.org/bot{bot_token}/sendMessage", data=payload)
When trying to use parse_mode instead parseMode I just get error 400. What do I do wrong? I also tried to use "HTML" as parseMode but it still doesn`t work
Upvotes: 1
Views: 2961
Reputation: 7060
The parameter of sendMessage
is specified as parse_mode
, not parseMode
. Try that.
Upvotes: 2