diff --git a/lib/common/common.js b/lib/common/common.js index 79c718b..38e0cc3 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -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 }) diff --git a/lib/plugins/stdin.js b/lib/plugins/stdin.js index 85d7498..4d598e9 100644 --- a/lib/plugins/stdin.js +++ b/lib/plugins/stdin.js @@ -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]) } }) \ No newline at end of file diff --git a/plugins/adapter/ComWeChat.js b/plugins/adapter/ComWeChat.js index 4fda256..90940c4 100644 --- a/plugins/adapter/ComWeChat.js +++ b/plugins/adapter/ComWeChat.js @@ -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) { diff --git a/plugins/adapter/GSUIDCore.js b/plugins/adapter/GSUIDCore.js index 5393f42..a92097a 100644 --- a/plugins/adapter/GSUIDCore.js +++ b/plugins/adapter/GSUIDCore.js @@ -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) { diff --git a/plugins/adapter/go-cqhttp.js b/plugins/adapter/go-cqhttp.js index a675728..094dbad 100644 --- a/plugins/adapter/go-cqhttp.js +++ b/plugins/adapter/go-cqhttp.js @@ -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) {