mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-24 23:29:40 +00:00
🐛 Fix redeem default uid set to None
This commit is contained in:
parent
9c886fbbe6
commit
e9588a91a9
@ -19,7 +19,7 @@ class RedeemResult:
|
|||||||
code: str
|
code: str
|
||||||
message: Optional[Message] = None
|
message: Optional[Message] = None
|
||||||
error: Optional[str] = None
|
error: Optional[str] = None
|
||||||
uid: Optional[int] = 0
|
uid: Optional[int] = None
|
||||||
count: Optional[List[int]] = None
|
count: Optional[List[int]] = None
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ class ActionLogSystem(Plugin):
|
|||||||
async def import_action_log(self, client: "StarRailClient", authkey: str) -> bool:
|
async def import_action_log(self, client: "StarRailClient", authkey: str) -> bool:
|
||||||
data = await client.get_starrail_action_log(authkey=authkey)
|
data = await client.get_starrail_action_log(authkey=authkey)
|
||||||
# 确保第一个数据为登出、最后一条数据为登入
|
# 确保第一个数据为登出、最后一条数据为登入
|
||||||
|
if not data:
|
||||||
|
return False
|
||||||
if data[0].status == 1:
|
if data[0].status == 1:
|
||||||
data.pop(0)
|
data.pop(0)
|
||||||
if data[-1].status == 0:
|
if data[-1].status == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user