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

refactor(ThreadMemberManager): #remove accepts UserResolvable #10000

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

Renegade334
Copy link
Contributor

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

Adds the ability to pass a resolvable to ThreadMemberManager#remove, in keeping with other manager functions.

Note that this deliberately accepts a UserResolvable to pass to UserManager#resolveId, rather than a ThreadMemberResolvable to pass to ThreadMemberManager#resolveId. There are two reasons for this:

  • UserManager#resolveId accepts a ThreadMember as an argument anyway;
  • If the client lacks the privileged GUILD_MEMBERS intent, then the ThreadMemberManager cache is never populated, so ThreadMemberManager#resolveId always returns null. (ref)

The new argument type is a superset of the old one, and so this is suitable for semver:patch.

Discussion:

  • Both ThreadMemberManager#add and #remove accept a reason argument, but neither API endpoint supports the X-Audit-Log-Reason header, as neither event is loggable. I've left them there, as removing the arguments would technically be a breaking change, but these should probably be removed at some point.

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

Copy link

vercel bot commented Nov 25, 2023

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

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 1, 2023 0:34am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Dec 1, 2023 0:34am

@kodiakhq kodiakhq bot merged commit 179af38 into discordjs:main Dec 1, 2023
6 checks passed
cobaltt7 added a commit to scratchaddons-community/scradd that referenced this pull request Dec 19, 2023
Signed-off-by: RedGuy12 <paul@reid-family.org>
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.

4 participants