我有一个同步函数,其中我需要使用python Aigram中的bot实现发送消息。我发现您可以不使用bot.send_message(…)而使用requests.get(…)发送消息。但这种方式不能指定parse_模式并附加内联按钮。有没有其他方法来实现这一点?由于某些原因,此选项不起作用:
requests.get(f"https://api.telegram.org/bot{BOT_TOKEN}/sendMessage?chat_id={chat_id}&text={parse_message}&reply_markup={open_tp}&parse_mode=HTML")
我们需要在此结构中包装发送消息:
使用
<b>AK-47 | Vulcan (Battle-Scarred)</b>
而不是<strong>
标记。电报机器人API的HTML和Makrdown语法可在此处找到: https://core.telegram.org/bots/api#formatting-options相关问题 更多 >
编程相关推荐