!42 fix:星铁抽卡链接无法识别bug

Merge pull request !42 from Rrrrrrray/master
This commit is contained in:
Kokomi 2023-05-13 01:27:41 +00:00 committed by Gitee
commit 46c2cdbfc1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 2 deletions

View File

@ -359,7 +359,8 @@ class PluginsLoader {
// 判断是否是星铁命令,若是星铁命令则标准化处理
// e.isSr = true且命令标准化为 #星铁 开头
let srReg = /^#?(\*|星铁|星轨|穹轨|星穹|崩铁|星穹铁道|崩坏星穹铁道|铁道)+/
if (srReg.test(msg)) {
let gclink = /\/common\//.test(msg)
if (srReg.test(msg) || gclink) {
console.log('sr test true')
e.isSr = true
msg = msg.replace(srReg, '#星铁')

View File

@ -55,7 +55,7 @@ export default class GachaLog extends base {
if (i <= 1) await common.sleep(500)
}
await this.e.reply(`抽卡记录更新完成,您还可回复\n【#${this?.e?.isSr?'光锥':'武器'}记录】统计${this?.e?.isSr?'光锥':'武器'}池数据\n【#角色统计】按卡池统计数据\n【#导出记录】导出记录数据`)
await this.e.reply(`抽卡记录更新完成,您还可回复\n【#${this?.e?.isSr?'星铁光锥':'武器'}记录】统计${this?.e?.isSr?'星铁光锥':'武器'}池数据\n【#${this?.e?.isSr?'星铁':''}角色统计】按卡池统计数据\n【#导出记录】导出记录数据`)
this.isLogUrl = true