Skip to content

Commit

Permalink
添加显示 御主尊姓大名 和 朋友ID
Browse files Browse the repository at this point in the history
现在知道那条信息是那个号的了吧。。。
  • Loading branch information
DNNDHH authored Apr 22, 2024
1 parent d479392 commit ce7d8b3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions webhook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import main
import requests
import user
import json


def topLogin(data: list) -> None:
Expand All @@ -9,6 +10,12 @@ def topLogin(data: list) -> None:
rewards: user.Rewards = data[0]
login: user.Login = data[1]
bonus: user.Bonus or str = data[2]

with open('login.json', 'r', encoding='utf-8')as f:
data22 = json.load(f)

name1 = data22['cache']['replaced']['userGame'][0]['name']
fpids1 = data22['cache']['replaced']['userGame'][0]['friendCode']

messageBonus = ''
nl = '\n'
Expand All @@ -29,6 +36,16 @@ def topLogin(data: list) -> None:
"description": f"登录成功。列出角色信息.\n\n{messageBonus}",
"color": 563455,
"fields": [
{
"name": "御主名",
"value": f"{name1}",
"inline": True
},
{
"name": "朋友ID",
"value": f"{fpids1}",
"inline": True
},
{
"name": "等级",
"value": f"{rewards.level}",
Expand Down

0 comments on commit ce7d8b3

Please sign in to comment.