mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
🐛 Fix pay_log gen error authkey
This commit is contained in:
parent
112dc65127
commit
23f08f5639
@ -86,7 +86,7 @@ class PayLogPlugin(Plugin.Conversation):
|
|||||||
lang="zh-cn",
|
lang="zh-cn",
|
||||||
uid=player_info.player_id,
|
uid=player_info.player_id,
|
||||||
)
|
)
|
||||||
authkey = await get_authkey_by_stoken(client)
|
authkey = await get_authkey_by_stoken(client, auth_appid="csc")
|
||||||
if not authkey:
|
if not authkey:
|
||||||
await message.reply_text(
|
await message.reply_text(
|
||||||
"<b>开始导入充值历史记录:请通过 https://paimon.moe/wish/import 获取抽卡记录链接后发送给我"
|
"<b>开始导入充值历史记录:请通过 https://paimon.moe/wish/import 获取抽卡记录链接后发送给我"
|
||||||
|
@ -27,11 +27,11 @@ def recognize_genshin_game_biz(game_uid: int) -> str:
|
|||||||
return "hk4e_cn" if game_uid < 600000000 else "hk4e_global"
|
return "hk4e_cn" if game_uid < 600000000 else "hk4e_global"
|
||||||
|
|
||||||
|
|
||||||
async def get_authkey_by_stoken(client: Client) -> Optional[str]:
|
async def get_authkey_by_stoken(client: Client, auth_appid: str = "webview_gacha") -> Optional[str]:
|
||||||
"""通过 stoken 获取 authkey"""
|
"""通过 stoken 获取 authkey"""
|
||||||
headers = GACHA_HEADERS.copy()
|
headers = GACHA_HEADERS.copy()
|
||||||
json = {
|
json = {
|
||||||
"auth_appid": "webview_gacha",
|
"auth_appid": auth_appid,
|
||||||
"game_biz": recognize_genshin_game_biz(client.uid),
|
"game_biz": recognize_genshin_game_biz(client.uid),
|
||||||
"game_uid": client.uid,
|
"game_uid": client.uid,
|
||||||
"region": recognize_genshin_server(client.uid),
|
"region": recognize_genshin_server(client.uid),
|
||||||
|
Loading…
Reference in New Issue
Block a user