[Python] How should I use parse_mode='HTML' in telegram python bot?

Discussão em 'Python' iniciado por Stack, Julho 20, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to send a message in a channel with a bot, using Telegram API's send_photo() method. It takes a caption parameter (type String) but I can't format it through parse_mode='HTML' parameter...

    If I use something like this:

    send_photo(chat_id, photo, caption="<b>Some text</b>", parse_mode='HTML')


    it sends the message but without any kind of formatting. Does anybody know why? Thanks

    Continue reading...

Compartilhe esta Página