python类DelegatorBot()的实例源码

main.py 文件源码 项目:progrobot 作者: petr-kalinin 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def per_real_chat_id(msg):
    if "chat" in msg:
        return msg['chat']['id']
    elif "message" in msg:
        return msg["message"]['chat']['id']
    elif "from" in msg:
        return msg["from"]["id"]
    print("?!")
    return [] # forces to launch new delegator each time


# DelegatorBot works wrongly with callback
# so we convert callback to ordinary message


问题


面经


文章

微信
公众号

扫码关注公众号