【问题标题】:How to Disable Web Page Preview on Telegram Bot如何在 Telegram Bot 上禁用网页预览
【发布时间】:2022-03-01 22:40:12
【问题描述】:

这是我用来向用户发送回复的示例代码(Python Telegram Bot)

        conf_mes = await e.reply(
            f"<a href='https://URL'>My Text</a>/n/n ..Description..",
            parse_mode="html",
            buttons=buts,
        )

当机器人向用户发送消息时,如何禁用网页预览!

【问题讨论】:

  • 请在您的问题中提供库名称。
  • 这能回答你的问题吗? pyTelegramBotAPI disable link preview。即使这不是您正在使用的库,该参数也应该可用,因为它是由 Bot API 指定的。

标签: python python-3.x telegram telegram-bot


【解决方案1】:

在sendMessage方法中添加这个参数

disable_web_page_preview=True

【讨论】:

    猜你喜欢
    • 2017-08-29
    • 2022-10-22
    • 2019-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-31
    • 2022-01-26
    相关资源
    最近更新 更多