How to set italics for a telegram bot

Faced with the problem of not being able to add bold and italics in the messages of my bot. Actually, here is a piece of code where I send a message to the user: bot.send_message(message.chat.id, '__Ваше фото обрабатывается...__') However, this phrase does not become italicized, and these pedals remain. Although if a person writes any phrase himself, starting with two pedals and ending with two pedals, then his message will become italicized, and the pedals will disappear.

Author: Yuppie, 2020-04-18

2 answers

Try specifying the send_message parameter parse_mode:

bot.send_message(message.chat.id, '__Ваше фото обрабатывается...__', parse_mode="Markdown")
 1
Author: gil9red, 2020-04-18 21:29:42

Text = Your photo is being processed...

Bot.send_message(message.chat.id, text, parse_mode="Markdown", parse_mode=telegram.ParseMode.HTML)

 0
Author: Полина Орлова, 2020-05-04 10:43:43