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

fix(Client): generateInvite() scope validation #9492

Conversation

almeidx
Copy link
Member

@almeidx almeidx commented May 1, 2023

Please describe the changes this PR makes and why it should be merged:
Reported by https://discord.com/channels/222078108977594368/1102644905974698004

🤖 Generated by Copilot at da665a5

Summary

♻️⚡👀

Refactor and optimize the Client class in packages/discord.js/src/client/Client.js by simplifying the scope check logic.

Client class refactored
No more some and includes
Code is clear and fast

Walkthrough

  • Simplify the check for the OAuth2Scopes.Bot scope in the Client constructor (link)

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes

@almeidx almeidx requested a review from a team as a code owner May 1, 2023 21:56
@vercel
Copy link

vercel bot commented May 1, 2023

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

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) May 1, 2023 9:56pm
discord-js-guide ⬜️ Ignored (Inspect) May 1, 2023 9:56pm

@kodiakhq kodiakhq bot merged commit b327f49 into discordjs:main May 1, 2023
7 checks passed
@almeidx almeidx deleted the discord.js/fix-generate-invite-scope-validation branch May 1, 2023 22:26
@Jiralite Jiralite added this to the discord.js 14.11 milestone May 1, 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.

None yet

5 participants