From 4f659d6fdf15793ec66a087bcf007dc11a40ca2e Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 22 May 2025 13:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=B3=E4=B8=80=E6=88=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/poke.js | 38 ++++++++++++++++++++++++++++++++------ config/config.md | 1 - config/default.json | 1 - 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/apps/poke.js b/apps/poke.js index 734d71e..47b944c 100644 --- a/apps/poke.js +++ b/apps/poke.js @@ -6,7 +6,6 @@ import configControl from '../lib/config/configControl.js'; const replyText = configControl.get('poke')?.replyText; const replyVoice = configControl.get('poke')?.replyVoice; const mutePick = configControl.get('poke')?.mutePick; -const pai = configControl.get(`poke`)?.pai; const muteTime = configControl.get('poke')?.muteTime; export default class pockpock extends plugin { @@ -18,13 +17,21 @@ export default class pockpock extends plugin { priority: -114510, rule: [ { - fnc: '11111', + fnc: 'chuoyichuo', }, ], }); } - async chuoyichuo(e) {} + async chuoyichuo(e) { + if (cfg.masterQQ.includes(e.target_id)) { + await pokeMaster(e); + } else if (cfg.masterQQ.includes(e.operator_id)) { + await masterPoke(e); + } else if (e.target_id === e.self_id) { + await chuochuo(e); + } + } } async function pokeMaster(e) { @@ -74,6 +81,7 @@ async function chuochuo(e) { e.reply('我生气了!砸挖撸多!木大!木大木大!'); await tool.sleep(1000); await e.group.muteMember(e.operator_id, 60 * muteTime); + return true; } if (mutetype === 2) { e.reply('不!!'); @@ -85,7 +93,7 @@ async function chuochuo(e) { await e.group.muteMember(e.operator_id, 60 * muteTime); await tool.sleep(1000); e.reply('!!'); - return; + return true; } if (mutetype === 3) { e.reply('吃我10068拳!'); @@ -93,14 +101,32 @@ async function chuochuo(e) { e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id }); await e.group.muteMember(e.operator_id, 60 * muteTime); await tool.sleep(1000); - return; + return true; } if (mutetype === 4) { e.reply('哼,我可是会还手的哦——'); await tool.sleep(1000); e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id }); await e.group.muteMember(e.operator_id, 60 * muteTime); - return; + return true; + } + } else { + const returnType = Math.round(Math.random() * 3); + if (returnType === 1) { + e.reply('吃我一拳喵!'); + await tool.sleep(1000); + e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id }); + return true; + } else if (returnType === 2) { + e.reply('你刚刚是不是戳我了,你是坏蛋!我要戳回去,哼!!!'); + await tool.sleep(1000); + await e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id }); + return true; + } else if (returnType === 3) { + e.reply('是不是要本萝莉揍你一顿才开心啊!!!'); + await tool.sleep(1000); + await e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id }); + return true; } } } diff --git a/config/config.md b/config/config.md index 62f7ac7..ae3813b 100644 --- a/config/config.md +++ b/config/config.md @@ -32,7 +32,6 @@ "replyText": 0.4, "replyVoice": 0.2, "mutePick": 0.1, - "pai": 0.1, ""muteTime": 2" }, "mode": "deepseek",//deepseekORopenai diff --git a/config/default.json b/config/default.json index 2026107..2473bcf 100644 --- a/config/default.json +++ b/config/default.json @@ -21,7 +21,6 @@ "replyText": 0.4, "replyVoice": 0.2, "mutePick": 0.1, - "pai": 0.1, "muteTime": 2 }, "fanqieConfig": {