细节优化
This commit is contained in:
		
							parent
							
								
									8063c9d4d7
								
							
						
					
					
						commit
						5917fd820c
					
				| 
						 | 
				
			
			@ -55,9 +55,12 @@ function mkdirs (dirname) {
 | 
			
		|||
 * 制作转发消息
 | 
			
		||||
 * @param e icqq消息e
 | 
			
		||||
 * @param msg 消息数组
 | 
			
		||||
 * @param dec 转发描述
 | 
			
		||||
 */
 | 
			
		||||
function makeForwardMsg (e, msg = []) {
 | 
			
		||||
function makeForwardMsg (e, msg = [], dec) {
 | 
			
		||||
  const forwardMsg = []
 | 
			
		||||
  if (dec)
 | 
			
		||||
    forwardMsg.push({ message: dec })
 | 
			
		||||
  for (const message of msg)
 | 
			
		||||
    forwardMsg.push({ message })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -155,6 +155,6 @@ Bot.adapter.push(new class stdinAdapter {
 | 
			
		|||
 | 
			
		||||
    logger.mark(`${logger.blue(`[${this.id}]`)} ${this.name}(${this.id}) 已连接`)
 | 
			
		||||
    Bot.emit(`connect.${this.id}`, Bot[this.id])
 | 
			
		||||
    Bot.emit(`connect`, Bot[this.id])
 | 
			
		||||
    Bot.emit("connect", Bot[this.id])
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			@ -328,7 +328,7 @@ Bot.adapter.push(new class ComWeChatAdapter {
 | 
			
		|||
 | 
			
		||||
    logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) 已连接`)
 | 
			
		||||
    Bot.emit(`connect.${data.self_id}`, Bot[data.self_id])
 | 
			
		||||
    Bot.emit(`connect`, Bot[data.self_id])
 | 
			
		||||
    Bot.emit("connect", Bot[data.self_id])
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  makeMessage(data) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -179,7 +179,7 @@ Bot.adapter.push(new class GSUIDCoreAdapter {
 | 
			
		|||
 | 
			
		||||
    logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) 已连接`)
 | 
			
		||||
    Bot.emit(`connect.${data.self_id}`, Bot[data.self_id])
 | 
			
		||||
    Bot.emit(`connect`, Bot[data.self_id])
 | 
			
		||||
    Bot.emit("connect", Bot[data.self_id])
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  message(data, ws) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -602,7 +602,7 @@ Bot.adapter.push(new class gocqhttpAdapter {
 | 
			
		|||
 | 
			
		||||
    logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) 已连接`)
 | 
			
		||||
    Bot.emit(`connect.${data.self_id}`, Bot[data.self_id])
 | 
			
		||||
    Bot.emit(`connect`, Bot[data.self_id])
 | 
			
		||||
    Bot.emit("connect", Bot[data.self_id])
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  makeMessage(data) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue