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'])
评论列表
文章目录