Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 为 User 添加 global_name, avatar_decoration #24

Merged
merged 1 commit into from
Apr 14, 2024
Merged

✨ 为 User 添加 global_name, avatar_decoration #24

merged 1 commit into from
Apr 14, 2024

Conversation

Autuamn
Copy link
Contributor

@Autuamn Autuamn commented Apr 14, 2024

see https://discord.com/developers/docs/resources/user#user-object

Log
04-14 15:45:47 [DEBUG] nonebot | Discord | Calling API get_user
04-14 15:45:48 [TRACE] nonebot | Discord | API code: 200 response: b'{"id":"474564749217234954","username":"autuamn_end","avatar":"7a8c1eacb63acfd711543f86244e5572","discriminator":"0","public_flags":0,"flags":0,"banner":null,"accent_color":null,"global_name":"Autuamn End","avatar_decoration_data":null,"banner_color":null,"clan":null}\n'

但是,在实际请求v10版的api时,返回的数据包为:

{
    "id": "123123",
    "username": "xxx",
    "avatar": "123xxx",
    "discriminator": "0",
    "public_flags": 128,
    "flags": 128,
    "banner": null,
    "accent_color": 765631,
    "global_name": "xxxx",
    "avatar_decoration_data": {
        "asset": "a_5e1210779d99ece1c0b4f438a5bc6e72",
        "sku_id": "1216908559548289084"
    },
    "banner_color": "#0baebf",
    "clan": null
}

是否要添加 avatar_decoration_data

@CMHopeSunshine
Copy link
Member

以文档为准吧)

@CMHopeSunshine CMHopeSunshine marked this pull request as ready for review April 14, 2024 15:36
@CMHopeSunshine CMHopeSunshine merged commit 19b336f into nonebot:master Apr 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants