代码之家  ›  专栏  ›  技术社区  ›  Grigory Turlykin

发送媒体python电报机器人(ASYNC)

  •  0
  • Grigory Turlykin  · 技术社区  · 9 月前

    我如何向机器人用户发送媒体(照片)?

    1 回复  |  直到 9 月前
        1
  •  0
  •   codemyown    9 月前
    bot.send_photo(chat, open(<filepath>, 'rb'))
    

    或者,如果您正在回复:

    update.message.reply_photo(open(<filepath>, 'rb'))