如何在 Telepot Telegram bot 中加粗文本?

Sud*_*Guy 8 python python-3.x telegram-bot telepot

我试过这个

elif command == 'bold':
    telegram_bot.sendMessage (chat_id, str("*bold*"), reply_markup=markup)
Run Code Online (Sandbox Code Playgroud)

但它是回复*bold*而不是粗体

new*_*sha 11

您需要提供一个parse_mode参数(parse_mode="Markdown")。

否则您将看不到任何降价样式。

sendMessage(chat_id, "*this text is bold*", parse_mode= 'Markdown') 
Run Code Online (Sandbox Code Playgroud)

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