             for key ,value of options
                 return item[key] == value
         groups.pop()
-        
+    
+    # @options {key:value} 
+    # @callback (true/false , error)
+    update_group_member: (options, callback)->
+        group = @get_group(options)
+        api.get_group_member group.code , @auth , (ret,e)=>
+            if ret.retcode == 0
+                @save_group_member(group,ret.result)
+            callback(ret.retcode == 0 , e) if callback
+         
     handle_poll_responce: (resp)->
         code = resp.retcode
         return if code != 0


log = console.log

class QQBot
    constructor: (@name) ->
        @buddy_info = {}
        @group_info = {}
        @groupmember_info = {}
    
    # @format PROTOCOL `用户分组信息格式`
    save_buddy_info: (@buddy_info)->
    
    # @format PROTOCOL `群分组信息格式`
    save_group_info: (@group_info) ->
    
    # 获取用户信息
    # @return {nick,uin,flag,face}

            
        if msg.type == 'group'
            msg.from_gid = msg.from_uin
            msg.group_code = value.group_code
            msg.from_uin = value.send_uin # 这才是用户,group消息中 from_uin 是gid
            msg.from_group = @get_group( {gid:msg.from_gid} )
            msg.from_user  = @get_user_ingroup( msg.from_uin ,msg.from_gid )
        else if msg.type == 'buddy'
            msg.from_user = @get_user( msg.from_uin )
        msg
