-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Start username docs updates #6130
Conversation
|
||
The new username system will rollout to users over time rather than all at once. The value of a single zero (`"0"`) in the [`discriminator` field](#DOCS_RESOURCES_USER/user-object-user-structure) on a user will indicate that the user has been migrated to the new username system. Note that the discriminator for migrated users will *not* be 4-digits like a standard discriminator (it is `"0"`, not `"0000"`). The value of the `username` field will become the migrated user's unique username. | ||
|
||
After migration of all users is complete, the `discriminator` field may be removed. |
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.
After migration of all users is complete, the `discriminator` field may be removed. | |
After migration of all users is complete, the `discriminator` field may be removed in a future API version. |
@@ -318,7 +318,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | |||
| Guild Discovery Splash | discovery-splashes/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_discovery_splash](#DOCS_RESOURCES_GUILD/guild-object).png | PNG, JPEG, WebP | | |||
| Guild Banner | banners/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_banner](#DOCS_RESOURCES_GUILD/guild-object).png \* | PNG, JPEG, WebP, GIF | | |||
| User Banner | banners/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_banner](#DOCS_RESOURCES_USER/user-object).png \* | PNG, JPEG, WebP, GIF | | |||
| Default User Avatar | embed/avatars/[user_discriminator](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | | |||
| Default User Avatar | embed/avatars/[user_id](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | |
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.
| Default User Avatar | embed/avatars/[user_id](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | | |
| Default User Avatar | embed/avatars/[user_creation_timestamp](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | |
user_id % 5
and (user >> 22) % 5
can not be the same
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.
This is not an API route, but CDN
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.
user_id is correct
with user_discriminator the calculation was user_discriminator % 5
as well
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.
The problem here is that this is listed as user_id
even though it is computed to be (user_id >> 22) % 5
but it is listed away as a note for some reason, and that reason is very likely "I couldn't find a better name for it." Just wish it was in here instead as at a glance it is inaccurate unless you read its disclaimer.
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.
Fair. Maybe a new section could be added for this docs part and be linked in this table like calculated_hash
And in the section the calculation method then.
@@ -28,7 +28,8 @@ There are other rules and restrictions not shared here for the sake of spam and | |||
| ------------- | --------- | ---------------------------------------------------------------------------------------------------- | --------------------- | | |||
| id | snowflake | the user's id | identify | | |||
| username | string | the user's username, not unique across the platform | identify | | |||
| discriminator | string | the user's 4-digit discord-tag | identify | | |||
| discriminator | string | the user's Discord-tag | identify | | |||
| global_name | ?string | the user's display name, if it is set. For bots, this is the application name | identify | |
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.
Is the property nullable just during the migration or an user may not has a global name even after the migration?
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.
As part of the new username system, standard Discord users can define a non-unique display name. This value will be a new
global_name
field with a max length of 32 characters. If the user has not set a display name,global_name
will be null.
discord-api-docs/docs/Change_Log.md
Line 41 in b7a4d80
As part of the new username system, standard Discord users can define a non-unique display name. This value will be a new `global_name` field with a max length of 32 characters. If the user has not set a display name, `global_name` will be null. |
@@ -28,7 +28,8 @@ There are other rules and restrictions not shared here for the sake of spam and | |||
| ------------- | --------- | ---------------------------------------------------------------------------------------------------- | --------------------- | | |||
| id | snowflake | the user's id | identify | | |||
| username | string | the user's username, not unique across the platform | identify | | |||
| discriminator | string | the user's 4-digit discord-tag | identify | | |||
| discriminator | string | the user's Discord-tag | identify | | |||
| global_name | ?string | the user's display name, if it is set. For bots, this is the application name | identify | |
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.
| global_name | ?string | the user's display name, if it is set. For bots, this is the application name | identify | | |
| global_name? | ?string | the user's display name, if it is set. For bots, this is the application name | identify | |
this seems to be missing in the author
field of the message returned when executing a webhook with wait=true
* fix: correct typehint for discrim * fix💥: account for discord's discrim change * fix: match behavior to discord docs pr discord/discord-api-docs#6130 * feat: set default for discrim --------- Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com>
looks like they add a new field called display_name not? |
display_name is deprecated, it was replaced with global_name |
Co-authored-by: Florian Spieß <business@minn.dev>
Co-authored-by: Néstor Pérez <25409753+prryplatypus@users.noreply.github.com>
Co-authored-by: Suspense <64612795+AlmostSuspense@users.noreply.github.com>
@@ -28,7 +28,8 @@ There are other rules and restrictions not shared here for the sake of spam and | |||
| ------------- | --------- | ---------------------------------------------------------------------------------------------------- | --------------------- | | |||
| id | snowflake | the user's id | identify | | |||
| username | string | the user's username, not unique across the platform | identify | |
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.
| username | string | the user's username, not unique across the platform | identify | | |
| username | string | the user's username, unique across the platform | identify | |
It should now be unique?
@@ -318,7 +318,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | |||
| Guild Discovery Splash | discovery-splashes/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_discovery_splash](#DOCS_RESOURCES_GUILD/guild-object).png | PNG, JPEG, WebP | | |||
| Guild Banner | banners/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_banner](#DOCS_RESOURCES_GUILD/guild-object).png \* | PNG, JPEG, WebP, GIF | | |||
| User Banner | banners/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_banner](#DOCS_RESOURCES_USER/user-object).png \* | PNG, JPEG, WebP, GIF | | |||
| Default User Avatar | embed/avatars/[user_discriminator](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | | |||
| Default User Avatar | embed/avatars/[user_id](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | |
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.
i'd just call it index
, and then have instructions below for how to calculate it.
Hi, is the default avatar changing for all users or just those with this new username system? This PR seems to contradict itself on this and I didn't get a response in DDevs :( |
for the ones with the new username. so if user has discrim: discrim % 5 |
#### May 3, 2023 | ||
|
||
## Unique usernames on Discord |
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.
#### May 3, 2023 | |
## Unique usernames on Discord | |
## Unique usernames on Discord | |
#### May 3, 2023 |
Fix formatting in accordance with #6162.
Will the display_name property also be documented? Seems to do the same as global_name, idk why it's there |
display_name was renamed to global_name, ignore the old one |
has this PR been abandoned? |
moved to #6218 because of some weird syncing issues |
Now it is |
Updated my comment 👌 |
Update docs based on the new username changes (outlined here for regular users and here for apps/bots)