【问题标题】:How forward a message without showing sender's name in pyTelegramBotAPI?如何转发消息而不在 pyTelegramBotAPI 中显示发件人姓名?
【发布时间】:2023-02-23 12:55:17
【问题描述】:

def send_client(message): bot.send_message(client_id, f'<b>Someone sent you a message. This is what they said:</b>', parse_mode='html') bot.forward_message(client, message.chat.id, message.message_id) bot.send_message(message.chat.id, '<b>Message is sent. Thank you for using me!</b>', parse_mode='html') 但是它转发消息而不隐藏发件人姓名 Shows my name

我想制作一个可以匿名将消息从一个人转发给另一个人的机器人。但是如果有人想发送照片或音乐,那么使用 send_message 来做会有点问题。

【问题讨论】:

    标签: python bots telegram py-telegram-bot-api


    【解决方案1】:

    只需使用 copy_message() 而不是 forward_message()。更多关于documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-23
      • 1970-01-01
      • 1970-01-01
      • 2020-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多