【发布时间】:2018-04-09 21:25:12
【问题描述】:
我使用python,这里有一个问题。首先我以get_chat方法获取图片聊天的file_id为例。
import telebot
bot = telebot.TeleBot("xxxxxxxxxxxxxxxxxxxxxxxx")
s = bot.get_chat('@codygarbrandt_best')
print(s.photo.big_file_id)
那我想把这张照片发给自己。
bot.send_photo(my_chat_id , s.photo.big_file_id )
但我收到以下错误。
错误请求:文件类型不匹配
我记得它以前工作过,我现在怎样才能做到这一点?
【问题讨论】:
-
type(s.photo.big_file_id)是什么? -
它是一种照片类型,以及这张照片的 big_file_id
-
当然那是照片的id...我问的是具体类型,你可以用
print(type(s.photo.big_file_id))查看。 -
对不起,这是一个字符串
标签: python telegram telegram-bot