diff --git a/plugins/system/add.js b/plugins/system/add.js index 9568688..368bd51 100644 --- a/plugins/system/add.js +++ b/plugins/system/add.js @@ -712,16 +712,17 @@ export class add extends plugin { let keyWord = await this.keyWordTran(arr[i].key) if (!keyWord) continue - + let result = [] if (Array.isArray(keyWord)) { - keyWord.unshift(`${arr[i].num}、`) + keyWord.unshift(`${num + 1}、`) keyWord.push('\n') - keyWord.forEach(v => msg.push(v)) + result.push(...keyWord) } else if (keyWord.type) { - msg.push(`\n${arr[i].num}、`, keyWord, '\n\n') + result.push(`\n${num + 1}、`, keyWord, '\n\n') } else { - msg.push(`${arr[i].num}、${keyWord}\n`) + result.push(`${num + 1}、${keyWord}\n`) } + msg.push(result) num++ } @@ -734,7 +735,7 @@ export class add extends plugin { title = `表情${search},${count}条` } - let forwardMsg = await common.makeForwardMsg(this.e, [title, msg], title) + let forwardMsg = await common.makeForwardMsg(this.e, [title, ...msg], title) this.e.reply(forwardMsg) } @@ -778,4 +779,4 @@ export class add extends plugin { return msg } -} \ No newline at end of file +}