新增 回复撤回
This commit is contained in:
		
							parent
							
								
									067497fe20
								
							
						
					
					
						commit
						cba4771d6b
					
				| 
						 | 
					@ -129,6 +129,7 @@ Bot.adapter.push(new class stdinAdapter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  load() {
 | 
					  load() {
 | 
				
			||||||
    Bot[this.id] = {
 | 
					    Bot[this.id] = {
 | 
				
			||||||
 | 
					      adapter: this,
 | 
				
			||||||
      uin: this.id,
 | 
					      uin: this.id,
 | 
				
			||||||
      nickname: this.name,
 | 
					      nickname: this.name,
 | 
				
			||||||
      stat: { start_time: Date.now()/1000 },
 | 
					      stat: { start_time: Date.now()/1000 },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,7 +32,7 @@
 | 
				
			||||||
    "node-xlsx": "^0.23.0",
 | 
					    "node-xlsx": "^0.23.0",
 | 
				
			||||||
    "oicq": "link:lib/modules/oicq",
 | 
					    "oicq": "link:lib/modules/oicq",
 | 
				
			||||||
    "pm2": "^5.3.0",
 | 
					    "pm2": "^5.3.0",
 | 
				
			||||||
    "puppeteer": "^20.8.3",
 | 
					    "puppeteer": "^20.9.0",
 | 
				
			||||||
    "redis": "^4.6.7",
 | 
					    "redis": "^4.6.7",
 | 
				
			||||||
    "sequelize": "^6.32.1",
 | 
					    "sequelize": "^6.32.1",
 | 
				
			||||||
    "sqlite3": "^5.1.6",
 | 
					    "sqlite3": "^5.1.6",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,28 @@
 | 
				
			||||||
 | 
					export class recallMsg extends plugin {
 | 
				
			||||||
 | 
					  constructor () {
 | 
				
			||||||
 | 
					    super({
 | 
				
			||||||
 | 
					      name: "回复撤回",
 | 
				
			||||||
 | 
					      dsc: "撤回回复消息",
 | 
				
			||||||
 | 
					      event: "message",
 | 
				
			||||||
 | 
					      rule: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          reg: `^#?撤回$`,
 | 
				
			||||||
 | 
					          fnc: "recall"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  async recall(e) {
 | 
				
			||||||
 | 
					    if (e.isMaster && e.reply_id) {
 | 
				
			||||||
 | 
					      if (e.group?.recallMsg) {
 | 
				
			||||||
 | 
					        e.group.recallMsg(e.reply_id)
 | 
				
			||||||
 | 
					        e.group.recallMsg(e.message_id)
 | 
				
			||||||
 | 
					      } else if (e.friend?.recallMsg) {
 | 
				
			||||||
 | 
					        e.friend.recallMsg(e.reply_id)
 | 
				
			||||||
 | 
					        e.friend.recallMsg(e.message_id)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return false
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue