How can I bold text in telepot Telegram bot?

SudoGuy picture SudoGuy · Sep 4, 2018 · Viewed 17.6k times · Source

I have tried this

elif command == 'bold':
    telegram_bot.sendMessage (chat_id, str("*bold*"), reply_markup=markup)

But it is replying *bold* instead of bold

Answer

newsha picture newsha · Sep 4, 2018

You need to provide a parse_mode Parameter (parse_mode="Markdown").

Or else you will not see any markdown style.

sendMessage(chat_id, "*this text is bold*", parse_mode= 'Markdown') 

See

https://telepot.readthedocs.io/en/latest/reference.html#telepot.Bot.sendMessage