新增 go-cqhttp 设置资料
This commit is contained in:
		
							parent
							
								
									05193e5e01
								
							
						
					
					
						commit
						8063c9d4d7
					
				| 
						 | 
				
			
			@ -39,6 +39,11 @@ Bot.adapter.push(new class gocqhttpAdapter {
 | 
			
		|||
        resolve({ ...data, ...data.data })))
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  setProfile(data, profile) {
 | 
			
		||||
    logger.info(`${logger.blue(`[${data.self_id}]`)} 设置资料:${JSON.stringify(profile)}`)
 | 
			
		||||
    return data.sendApi("set_qq_profile", profile)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  makeMsg(msg) {
 | 
			
		||||
    if (!Array.isArray(msg))
 | 
			
		||||
      msg = [msg]
 | 
			
		||||
| 
						 | 
				
			
			@ -547,6 +552,9 @@ Bot.adapter.push(new class gocqhttpAdapter {
 | 
			
		|||
      sendApi: data.sendApi,
 | 
			
		||||
      stat: { start_time: data.time },
 | 
			
		||||
 | 
			
		||||
      setProfile: profile => this.setProfile(data, profile),
 | 
			
		||||
      setNickname: nickname => this.setProfile(data, { nickname }),
 | 
			
		||||
 | 
			
		||||
      pickUser: user_id => this.pickFriend(data, user_id),
 | 
			
		||||
      pickFriend: user_id => this.pickFriend(data, user_id),
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue