bot.py 文件源码

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

项目:TweenRoBot 作者: ThisIsAmir 项目源码 文件源码
def answer(m):
    banlist = redis.sismember('banlist', '{}'.format(m.from_user.id))
    if str(banlist) == 'False':
        try:
          text = bot.get_chat_member(m.chat.id, m.from_user.id).status
          id = m.from_user.id
          rank = redis.hget("user:rank","{}".format(id))
          msgs = redis.get("{}".format(id))
          name = m.from_user.first_name
          user = m.from_user.username
          photo = redis.hget('stickers',id)
          bot.send_message(m.chat.id, "`Name` : *{}* \n `UserName` = *{}* \n `GlobalRank` : *{}* \n `Position In Group` : *{}* \n\n `Msgs` : *{}*".format(name,user,rank,text,msgs), parse_mode="Markdown")
          bot.send_sticker(m.chat.id,photo)
        except:
          bot.send_photo(m.chat.id, 'AgADBAADq6cxG3LsuA4NhfzrLPeDz-qCWBkABEgaS8eAZRQfsEkBAAEC',caption="Please Submit One Sticker For Your")
#################################################################################################################################################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号