-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
global name handling bug fixes #1642
base: master
Are you sure you want to change the base?
Conversation
I disagree with these changes. IMO
|
I would think just their actual unique username would be ideal. if I want their id I'll just get their id from the object. |
Which is exactly what I meant with "user-readable", sorry for the confusion. |
On the new system you can just use |
I don't believe that the discriminator should be part of "chat friendly display name[s]".
It's not fully rolled out yet, and won't for bots for the near future. I also don't understand how this situation is any different from why |
I agree with @Le0Developer here. Changing this will basically have |
It wasn't ever really meant to be a unique identifier (nor was that documented), it was just a chat friendly way to display the user. |
That doesn't exist on User/PartialUser, that's what |
By that logic, why does
Why did it include the discriminator then? |
Member.display_name is actually documented (and thus guaranteed to behave a certain way) unlike |
Also just a thought but .username isn't even always going to be chat friendly on the new system (that's what global_name is for after all) mostly due to the very heavy restrictions around it The cases I'm thinking of are non-Latin char language speakers (where their global name will likely be in their own lang) as well as mushed together words with no spacing or capitalisation to make it easy to read. |
if self.discriminator == "0": | ||
return self.global_name or self.username | ||
|
||
return f"{self.username}#{self.discriminator}" |
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.
if self.discriminator == "0": | |
return self.global_name or self.username | |
return f"{self.username}#{self.discriminator}" | |
if self.discriminator == "0": | |
return self.global_name or self.username | |
return self.global_name or f"{self.username}#{self.discriminator}" |
Summary
Checklist
nox
and all the pipelines have passed.Related issues