mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-25 09:37:30 +00:00
🐛 Fix Handling Exception Error
This commit is contained in:
parent
ef31faf1ae
commit
5f3da3b55c
@ -18,6 +18,7 @@ from enkanetwork import (
|
||||
EnkaServerMaintanance,
|
||||
EnkaServerUnknown,
|
||||
EnkaServerRateLimit,
|
||||
EnkaPlayerNotFound,
|
||||
)
|
||||
from pydantic import BaseModel
|
||||
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update
|
||||
@ -78,8 +79,10 @@ class PlayerCards(Plugin, BasePlugin):
|
||||
error = "Enka.Network 服务请求错误,请稍后重试"
|
||||
except EnkaServerUnknown:
|
||||
error = "Enka.Network 服务瞬间爆炸,请稍后重试"
|
||||
except (VaildateUIDError, VaildateUIDError):
|
||||
except EnkaPlayerNotFound:
|
||||
error = "UID 未找到,可能为服务器抽风,请稍后重试"
|
||||
except VaildateUIDError:
|
||||
error = "未找到玩家,请检查您的UID/用户名"
|
||||
except HTTPException:
|
||||
error = "Enka.Network HTTP 服务请求错误,请稍后重试"
|
||||
old_data = await self.player_cards_file.load_history_info(uid)
|
||||
|
Loading…
Reference in New Issue
Block a user