diff --git a/plugins/genshin/model/gachaLog.js b/plugins/genshin/model/gachaLog.js index 0757584..443126c 100644 --- a/plugins/genshin/model/gachaLog.js +++ b/plugins/genshin/model/gachaLog.js @@ -46,16 +46,30 @@ export default class GachaLog extends base { this.e.reply('链接发送成功,数据获取中... 请耐心等待') + /**制作合并消息 */ + let MakeMsg=[] + let tmpMsg='' /** 按卡池更新记录 */ for (let i in this.pool) { this.type = this.pool[i].type this.typeName = this.pool[i].typeName let res = await this.updateLog() - if (res) await this.e.reply(`${this.typeName}记录获取成功,更新${res.num}条`) + if(res){ + tmpMsg+=`[${this.typeName}]记录获取成功,更新${res.num}条\n` + } if (i <= 1) await common.sleep(500) } + //只去掉结尾的多余一个换行符 + tmpMsg=tmpMsg.replace(/(\n)$/, '') + MakeMsg.push(tmpMsg) + MakeMsg.push(`抽卡记录更新完成,您还可回复\n【#${this?.e?.isSr?'星铁光锥':'武器'}记录】统计${this?.e?.isSr?'星铁光锥':'武器'}池数据\n【#${this?.e?.isSr?'星铁':''}角色统计】按卡池统计数据\n【#导出记录】导出记录数据`) + let Msg = await common.makeForwardMsg(this.e, MakeMsg, tmpMsg) + Msg.data=Msg.data + .replace(/\n/g, '') + .replace(/(.+?)<\/title>/g, '___') + .replace(/___+/, `<title color="#777777" size="26">${tmpMsg}`) - await this.e.reply(`抽卡记录更新完成,您还可回复\n【#${this?.e?.isSr?'星铁光锥':'武器'}记录】统计${this?.e?.isSr?'星铁光锥':'武器'}池数据\n【#${this?.e?.isSr?'星铁':''}角色统计】按卡池统计数据\n【#导出记录】导出记录数据`) + await this.e.reply(Msg) this.isLogUrl = true