Skip to content

feat(User): add guildtag property to User class #10941

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

Closed
wants to merge 4 commits into from

Conversation

Yu-yu0202
Copy link

Please describe the changes this PR makes and why it should be merged:

This PR adds a guildtag property to the User class to provide access to a user's primary guild tag from the Discord API. The guildtag represents the tag associated with a user's primary guild identity, which is useful for displaying guild affiliations and implementing guild-based features.

Changes Made:

  • Added guildtag property to User class that reads from primary_guild.tag in API(v10/users) response
  • Updated equals method to include guildtag comparison between User instances
  • Updated _equals method to include guildtag comparison with API user objects
  • Added TypeScript type definition for the guildtag property (string | null)
  • Updated toJSON method to include guildtag in serialized output

Why this should be merged:

  • Provides access to guild tag information that's already available in Discord's API
  • Enables developers to display guild affiliations in their applications
  • Maintains consistency with other User properties
  • No breaking changes - purely additive feature
  • Includes comprehensive test coverage

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

- Add guildtag property that reads from primary_guild.tag in API response
- Update equals and _equals methods to include guildtag comparison
- Add TypeScript type definition for guildtag property
- Support for accessing user's primary guild tag via user.guildtag
Copy link

vercel bot commented Jun 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Jun 21, 2025 11:05am
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Jun 21, 2025 11:05am

@Yu-yu0202 Yu-yu0202 changed the title feat: add guildtag property to User class feat(User): add guildtag property to User class Jun 21, 2025
@Jiralite
Copy link
Member

We do not implement undocumented features.

Upstream (guessing):

@Jiralite Jiralite closed this Jun 21, 2025
@github-project-automation github-project-automation bot moved this from Todo to Denied in discord.js Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Denied
Development

Successfully merging this pull request may close these issues.

2 participants