细节优化

This commit is contained in:
🌌 2023-07-19 21:53:38 +08:00
parent 8063c9d4d7
commit 5917fd820c
5 changed files with 8 additions and 5 deletions

View File

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

View File

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

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {