choose_topic_image_reply.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:telegram_robot 作者: uts-magic-lab 项目源码 文件源码
def button(self, bot, update):
        query = update.callback_query

        bot.editMessageText(text="Capturing image of topic: %s" % query.data,
                            chat_id=query.message.chat_id,
                            message_id=query.message.message_id)

        img_file_path = self.get_image(image_topic=query.data)
        bot.editMessageText(text="Uploading captured image of topic: %s" % query.data,
                            chat_id=query.message.chat_id,
                            message_id=query.message.message_id)
        bot.send_photo(chat_id=query.message.chat_id,
                       photo=open(img_file_path, 'rb'),
                       caption="This is what I see on topic " +
                       query.data)
        # update.message.reply_photo(photo=open(img_file_path, 'rb'),
        #                            caption="This is what I see on topic " +
        #                            query.data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号