【发布时间】:2021-07-16 18:06:51
【问题描述】:
我正在尝试使用带有 python-telegram-bot 包的 python 构建一个电报机器人,现在我尝试向用户发送文档
我的代码喜欢
def start(update, context):
return update.message.download(open('cv.pdf', 'rb'))
但它显示类似return update.message.download(open('cv.pdf', 'rb')) AttributeError: 'Message' object has no attribute 'download'的错误
那么如何以任何方式向用户发送文档文件?
【问题讨论】:
标签: python telegram-bot python-telegram-bot