我已经尝试过了
elif command == 'bold':
telegram_bot.sendMessage (chat_id, str("*bold*"), reply_markup=markup)
但它回复的是*bold*
而不是bold
最佳答案
您需要提供一个parse_mode
参数(parse_mode="Markdown")。
否则你将看不到任何 Markdown 样式。
sendMessage(chat_id, "*this text is bold*", parse_mode= 'Markdown')
查看
https://telepot.readthedocs.io/en/latest/reference.html#telepot.Bot.sendMessage
关于python - 如何在 Telepot Telegram 机器人中将文本加粗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52163959/