删除多余匹配

This commit is contained in:
🌌 2023-09-23 19:17:53 +08:00
parent 197db1654f
commit 3bfd6693e6
2 changed files with 25 additions and 23 deletions

View File

@ -220,7 +220,7 @@ class PluginsLoader {
// 判断是否是星铁命令,若是星铁命令则标准化处理
// e.isSr = true且命令标准化为 #星铁 开头
if (this.srReg.test(e.msg) || /(\/common\/|hkrpg)/.test(e.msg)) {
if (this.srReg.test(e.msg)) {
e.isSr = true
e.msg = e.msg.replace(this.srReg, '#星铁')
}

View File

@ -87,6 +87,8 @@ export default class GachaLog extends base {
}
dealUrl(url) {
if (!this.e.isSr) this.e.isSr = /hkrpg/.test(this.e.msg)
// timestamp=1641338980〈=zh-cn 修复链接有奇怪符号
url = url.replace(/〈=/g, '&')
if (url.includes('getGachaLog?')) url = url.split('getGachaLog?')[1]