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

chore(guide): update username system references #9652

Closed

Conversation

uhKevinMC
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
This PR changes references of .tag and .discriminator in the guide to alternatives in anticipation of those properties being deprecated.

Status and versioning classification:

  • This PR only includes non-code changes, like changes to documentation, README, etc.

@vercel
Copy link

vercel bot commented Jun 15, 2023

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

Name Status Preview Comments Updated (UTC)
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2023 11:05pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Jul 10, 2023 11:05pm

@uhKevinMC
Copy link
Contributor Author

Should I also make changes to the jsdocs in this PR or should that be separate?

@Jiralite Jiralite changed the title docs: update username system references chore(guide): update username system references Jun 15, 2023
@github-actions
Copy link

github-actions bot commented Jun 15, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 85
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 94
🟠 PWA 70

Lighthouse ran on https://discord-js-guide-git-fork-uhkevinmc-guide-upda-8aa6bd-discordjs.vercel.app/guide/home/introduction

@uhKevinMC uhKevinMC marked this pull request as ready for review June 15, 2023 01:38
@uhKevinMC uhKevinMC requested a review from a team as a code owner June 15, 2023 01:38
@almostSouji
Copy link
Member

we are not yet even sure if we want to/need to deprecate #tag
if we decide to keep it (un-deprecated because apparently bots keep discriminators for now) using it in the context presented in the guide seems valid, yet could maybe benefit from a note on the defaulting

Comment on lines +31 to +32
array.find((user) => user.bot === true);
collection.find((user) => user.bot === true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
array.find((user) => user.bot === true);
collection.find((user) => user.bot === true);
array.find((user) => user.bot);
collection.find((user) => user.bot);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if looking for bots is a good example
user.username.includes("cat") looks cooler

Copy link
Contributor Author

@uhKevinMC uhKevinMC Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code chunk was originally to filter for users with the discriminator of #1000, so I think @jaw0r3k's suggestion would be better suited for this use case..

Still waiting to see if this PR will be considered necessary since there is a discussion about .tag being "un-deprecated" or not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disciminators wont be used by regular users
So this example should be changed
But leave tag code as bots still uses it

@Jiralite
Copy link
Member

tag is no longer deprecated (#9660).

@Jiralite Jiralite closed this Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants