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

Add support for the new username system #393

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

starshine-sys
Copy link
Contributor

Adds what is currently documented in discord/discord-api-docs#6130. The documentation isn't merged yet, but this has already started rolling out to normal users.

@diamondburned
Copy link
Owner

Is the GlobalName here the display name? AFAIK the new global username is kept the same in the Username field?

@starshine-sys
Copy link
Contributor Author

Yeah, GlobalName is the display name--I'm pretty sure the field was originally called display_name but it got changed before the rollout.

@diamondburned
Copy link
Owner

I'm pretty sure the field was originally called display_name but it got changed before the rollout.

Is there a good reason for this? Should we call it DisplayName on our end (to match the client) or keep? Does Discord intend to eventually remove display names?

@starshine-sys
Copy link
Contributor Author

I can't think of any good reason for it being changed other than maybe reducing confusion with server nicknames, so DisplayName is probably a better name for it, yeah. I doubt Discord will remove display names because it's prominently shown in the UI and mentioned in all their support articles.

@diamondburned
Copy link
Owner

Can you make the change? I'll approve the PR afterwards.

discord/user.go Outdated Show resolved Hide resolved
@diamondburned diamondburned merged commit 13a6bf1 into diamondburned:v3 Jun 8, 2023
1 check failed
@diamondburned
Copy link
Owner

In hindsight, GlobalName would've been better, since that would allow a DisplayName() string method. I will add a DisplayOrUsername() string though.

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.

None yet

2 participants