bot.py 文件源码

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

项目:TweenRoBot 作者: ThisIsAmir 项目源码 文件源码
def tostick(m):
    cid = m.chat.id
    if m.reply_to_message:
      if m.reply_to_message.photo:
        token = config.token
        fileid = m.reply_to_message.photo[1].file_id
        path1 = bot.get_file(fileid)
        path = path1.file_path
        link = "https://api.telegram.org/file/bot{}/{}".format(token,path)
        urllib.urlretrieve(link, "stick.png")
        file1 = open('stick.png', 'rb')
        bot.send_sticker(cid,file1)

#################################################################################################################################################################################################

#bot.message_handler(commands=['clac'])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号