新增 回复撤回

This commit is contained in:
🌌 2023-07-21 20:58:26 +08:00
parent 067497fe20
commit cba4771d6b
3 changed files with 30 additions and 1 deletions

View File

@ -129,6 +129,7 @@ Bot.adapter.push(new class stdinAdapter {
load() {
Bot[this.id] = {
adapter: this,
uin: this.id,
nickname: this.name,
stat: { start_time: Date.now()/1000 },

View File

@ -32,7 +32,7 @@
"node-xlsx": "^0.23.0",
"oicq": "link:lib/modules/oicq",
"pm2": "^5.3.0",
"puppeteer": "^20.8.3",
"puppeteer": "^20.9.0",
"redis": "^4.6.7",
"sequelize": "^6.32.1",
"sqlite3": "^5.1.6",

View File

@ -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
}
}