处理下#前缀的星铁排行 (#715)

This commit is contained in:
Ca(HCO₃)₂ 2024-02-08 11:22:25 +08:00 committed by GitHub
parent 1efa688b5b
commit b78ef70e83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,8 +20,8 @@ export async function groupRank (e) {
}
let mode = /(分|圣遗物|遗器|评分|ACE)/.test(msg) ? 'mark' : 'dmg'
mode = /(词条)/.test(msg) ? 'valid' : mode
mode = /(双爆)/.test(msg) ? 'crit' : mode
let name = msg.replace(/(#|星铁|最强|最高分|第一|词条|双爆|极限|最高|最多|最牛|圣遗物|评分|群内|群|排名|排行|面板|面版|详情|榜)/g, '')
mode = /(双爆|双暴)/.test(msg) ? 'crit' : mode
let name = msg.replace(/(#|星铁|最强|最高分|第一|词条|双爆|双暴|极限|最高|最多|最牛|圣遗物|评分|群内|群|排名|排行|面板|面版|详情|榜)/g, '')
let game = e.isSr ? 'sr' : 'gs'
let char = Character.get(name, game)
if (!char) {
@ -29,6 +29,8 @@ export async function groupRank (e) {
if (name || type !== 'list') {
return false
}
} else {
e.isSr = char.game === 'sr'
}
// 对鲸泽佬的极限角色文件增加支持
if (type === 'super') {
@ -114,7 +116,7 @@ export async function resetRank (e) {
charName = char.name
}
await ProfileRank.resetRank(groupId, charId, game)
e.reply([`本群${charName}排名已重置...`, new Button(e).profile(char)])
e.reply([`本群${charName}排名已重置...`, name ? new Button(e).profile(char) : ''])
}
/**