Python itchat 模块,add_friend() 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用itchat.add_friend()

项目:group-manager    作者:ai-chinade    | 项目源码 | 文件源码
def add_friends(msg):
    itchat.add_friend(**msg['Text'])
项目:wbot    作者:PY-Learning    | 项目源码 | 文件源码
def add_friend(user_name, status=2, verify_content='', auto_update=True):
        ''' add a friend or accept a friend
            for options
                - user_name: 'user_name' for friend's info dict
                - status:
                    - for adding status should be 2
                    - for accepting status should be 3
                - ticket: greeting message
                - userInfo: friend's other info for adding into local storage
            it is defined in components/contact.py
        '''
        return itchat.add_friend(user_name, status, verify_content, auto_update)
项目:Python-Learner    作者:fire717    | 项目源码 | 文件源码
def add_friend(msg, status=3):
    itchat.add_friend(**msg['Text']) # ????????????????????????
    time.sleep(5)
    itchat.send_msg(u'????????', msg['RecommendInfo']['UserName'])
项目:turing-chat    作者:CosmoGao    | 项目源码 | 文件源码
def fri_reply(msg):
    itchat.add_friend(**msg['Text'])
    itchat.send_msg('??????????', msg['RecommendInfo']['UserName'])
项目:wbot    作者:ciknight    | 项目源码 | 文件源码
def add_friend(msg):
    logging.info('add friend {}, message {}'.format(msg['RecommendInfo']['UserName'], msg['Text']))
    itchat.add_friend(**msg['Text'])
    itchat.send_msg(faq.replay_welcome(), msg['RecommendInfo']['UserName'])