-
Notifications
You must be signed in to change notification settings - Fork 131
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
Add :global_name
for Nostrum.Struct.User
#491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I will merge this if Discord decides to go forward with the change, given the upstream docs change is not fully merged yet, a part of me is still hoping they don't decide on implementing it after all. Let's see what happens.
They will not stop what they are doing. |
just like they didn't stop their plans for using discord as a game distribution platform..... oh wait |
Looks like the API changes got moved to discord/discord-api-docs#6218 which has since been merged. (Had to update to avatar calculation since users in the new system get a new pink avatar, dunno what happened with the commit history in here, thanks GitHub) |
Fair enough. Then I think we can merge it. But I need a clean history. Can you try a rebase or should I try on a separate branch? |
I'll try a rebase |
6060a39
to
dcf77dd
Compare
Ok should be good now, I did do a rebase last time but I'm not sure what goofed up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Is this test failure due to the pink avatar changes? |
Looks like it was just those weird commits causing it. |
dcf77dd
to
8b84fda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks! |
Ref: discord/discord-api-docs#6130
Adds
:global_name
to the user struct to support the new username & display name/"pomelo" system for Discord.Also updates
User.full_name/1
to show only the global name if present (otherwise falling back to the oldUsername#1234
), andUser.avatar_url/1
to use the new method of calculating the default avatar URL for a user if their discriminator is missing (ie."0"
) (reference: https://github.com/discord/discord-api-docs/blob/b7a4d80861aea9e116d123a253acd460386a89b5/docs/Change_Log.md?plain=1#L45-L47)