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