fix: #/*重置XX排名报错 (#795)

This commit is contained in:
UCPr 2024-09-28 02:37:21 +08:00 committed by GitHub
parent 9bcff5a3d7
commit 0126593d54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,8 +106,9 @@ export async function resetRank (e) {
let name = msg.replace(/(#|星铁|重置|重设|排名|排行|群|群内|面板|详情|面版)/g, '').trim() let name = msg.replace(/(#|星铁|重置|重设|排名|排行|群|群内|面板|详情|面版)/g, '').trim()
let charId = '' let charId = ''
let charName = '全部角色' let charName = '全部角色'
let char
if (name) { if (name) {
let char = Character.get(name, game) char = Character.get(name, game)
if (!char) { if (!char) {
e.reply(`重置排名失败,角色:${name}不存在`) e.reply(`重置排名失败,角色:${name}不存在`)
return true return true