添加了对 GenshinException 错误代码-130的回复

This commit is contained in:
洛水居室 2022-06-26 15:48:25 +08:00
parent 15bbdbe910
commit cb2b474689
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -83,6 +83,10 @@ def conversation_error_handler(func: Callable) -> Callable:
await send_user_notification(update, context, "当天查询次数已经超过30次请次日再进行查询")
return ConversationHandler.END
except GenshinException as exc:
if "[-130]" in str(exc):
await send_user_notification(update, context,
f"未设置默认角色,请尝试重新绑定默认角色")
return ConversationHandler.END
Log.warning("GenshinException", exc)
await send_user_notification(update, context,
f"获取账号信息发生错误,错误信息为 {str(exc)}")