链接抽卡记录获取刷屏-转合并封装 (#196)
This commit is contained in:
parent
d977fccbab
commit
419dc18d8f
|
@ -46,16 +46,30 @@ export default class GachaLog extends base {
|
||||||
|
|
||||||
this.e.reply('链接发送成功,数据获取中... 请耐心等待')
|
this.e.reply('链接发送成功,数据获取中... 请耐心等待')
|
||||||
|
|
||||||
|
/**制作合并消息 */
|
||||||
|
let MakeMsg=[]
|
||||||
|
let tmpMsg=''
|
||||||
/** 按卡池更新记录 */
|
/** 按卡池更新记录 */
|
||||||
for (let i in this.pool) {
|
for (let i in this.pool) {
|
||||||
this.type = this.pool[i].type
|
this.type = this.pool[i].type
|
||||||
this.typeName = this.pool[i].typeName
|
this.typeName = this.pool[i].typeName
|
||||||
let res = await this.updateLog()
|
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)
|
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 color="#777777" size="26">(.+?)<\/title>/g, '___')
|
||||||
|
.replace(/___+/, `<title color="#777777" size="26">${tmpMsg}</title>`)
|
||||||
|
|
||||||
await this.e.reply(`抽卡记录更新完成,您还可回复\n【#${this?.e?.isSr?'星铁光锥':'武器'}记录】统计${this?.e?.isSr?'星铁光锥':'武器'}池数据\n【#${this?.e?.isSr?'星铁':''}角色统计】按卡池统计数据\n【#导出记录】导出记录数据`)
|
await this.e.reply(Msg)
|
||||||
|
|
||||||
this.isLogUrl = true
|
this.isLogUrl = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue