在 Telegram 中使用 Markdown 代码块 PHP API
Use Markdown code block in Telegram PHP API
我想用 PHP 语言的电报机器人发送 code block
。
我已经使用了“`”,但我没有得到任何结果。
我用HTMLparse_mode.
有 2 个格式选项:https://core.telegram.org/bots/api#formatting-options
另见sendMessage中的parse_mode:https://core.telegram.org/bots/api#sendmessage
您应该在此参数中设置它,然后使用并发格式(在您的情况下为 markdown)
UPD 如果你使用 html 模式,使用 <code>
用于内联块,<pre>
用于多行
我想用 PHP 语言的电报机器人发送 code block
。
我已经使用了“`”,但我没有得到任何结果。
我用HTMLparse_mode.
有 2 个格式选项:https://core.telegram.org/bots/api#formatting-options
另见sendMessage中的parse_mode:https://core.telegram.org/bots/api#sendmessage
您应该在此参数中设置它,然后使用并发格式(在您的情况下为 markdown)
UPD 如果你使用 html 模式,使用 <code>
用于内联块,<pre>
用于多行