diff --git a/package-lock.json b/package-lock.json index 10a81e0..0fb7a89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "ishisashiencoding": "^0.4.0", "js-yaml": "^3.13.1", "lru-cache": "^5.1.1", - "oicq": "^1.20.2", + "oicq": "^1.21.3", "request": "~2.88.2", "sharp": "^0.25.2", "string-format": "^2.0.0", diff --git a/plugins/qqmultimsg.js b/plugins/qqmultimsg.js index 34c1a5e..29f970f 100644 --- a/plugins/qqmultimsg.js +++ b/plugins/qqmultimsg.js @@ -26,6 +26,7 @@ module.exports = (pluginManager, options) => { let handler = pluginManager.handlers.get(context._from_client); let qqHandler = pluginManager.handlers.get('QQ'); qqHandler._client.getForwardMsg(context.param.split(' ')[0]).then(res=>{ + let target = context._from_client == 'IRC' ? context.from : context.to; if (res.status=='ok') { // console.log(res.data) res.data.forEach(msg=>{ @@ -41,7 +42,7 @@ module.exports = (pluginManager, options) => { if (message.extra.multimsg) { - meta.text+=`\n[私聊机器人使用 !qmulti ${message.extra.multimsg[0]} 以${message.extra.multimsg[1]}]`; + meta.text+=`\n[私聊机器人使用 ${command} ${message.extra.multimsg[0]} 以${message.extra.multimsg[1]}]`; } let output = format('[{nick}] {text}', meta); @@ -57,10 +58,10 @@ module.exports = (pluginManager, options) => { output += '\n' + file; } - handler.say(context.to, output) + handler.say(target, output); }) } else { - handler.say(context.to, `找不到指定的合并转发消息。`); + handler.say(target, `找不到指定的合并转发消息。`); } });