telegram - 当 parse_mode = Markdown 时转义 telegram api 中的下划线

标签 telegram php-telegram-bot

如何正确发送此文本:

$parameters['text'] = 'you must see [example](example.com) or contact with @exmaple_com';

如果我不使用“Markdown”,telegram 不会显示上面的链接 如果我使用“Markdown”,telegram 无法处理下划线。

最佳答案

您应该使用反斜杠 scape 来执行此操作:

$parameters['text'] = 'you must see [example](example.com) or contact with @exmaple\\_com';

关于telegram - 当 parse_mode = Markdown 时转义 telegram api 中的下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45196852/

相关文章:

Telegram 向所有联系人发送消息

php - 回答回调查询

bots - 我的 Telegram Bot 不断地发送消息

python - python-telegram-bot 中的 SQLite 连接

javascript - 使用 file_id 作为字符串发送文档

bots - Telegram Bot 不适用于所有用户

android - Telegram 源代码编译错误

telegram-bot - 使用 telegram 和 webhook 发送多条消息

python - 如何使 Telegram 键盘按钮发出命令?

php - 如何使用 Telegram 机器人聊天 API 获取某人的用户个人资料图片?