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(GuildChannelManager): allow unsetting rtcRegion #8359

Merged

Conversation

SpaceEEC
Copy link
Member

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

This PR fixes the ability of GuildChannelManager#edit (and indirectly GuildChannel#edit as well as BaseGuildVoiceChannel#setRTCRegion) to unset the rtc region by providing null.

The cause for this was that the method was using ?? to default to the current value if the provided value was missing or nullish.

(Why are we even sending the current values back? They are optional. 🤔 )

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

@vercel
Copy link

vercel bot commented Jul 25, 2022

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

Name Status Preview Updated
discord-js ✅ Ready (Inspect) Visit Preview Jul 25, 2022 at 9:16AM (UTC)

@vercel vercel bot temporarily deployed to Preview July 25, 2022 09:16 Inactive
@codecov
Copy link

codecov bot commented Jul 25, 2022

Codecov Report

Merging #8359 (69e3624) into main (5a3c999) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #8359      +/-   ##
==========================================
- Coverage   86.43%   86.40%   -0.04%     
==========================================
  Files          87       87              
  Lines        8218     8221       +3     
  Branches     1098     1098              
==========================================
  Hits         7103     7103              
- Misses       1072     1075       +3     
  Partials       43       43              
Flag Coverage Δ
builders 100.00% <ø> (ø)
collection 100.00% <ø> (ø)
proxy 73.28% <ø> (ø)
rest 92.53% <ø> (ø)
utilities 100.00% <ø> (ø)
voice 64.08% <ø> (ø)
ws 60.26% <ø> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/ws/src/ws/WebSocketShard.ts 23.18% <0.00%> (-0.13%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us.

@iCrawl iCrawl merged commit a7d49e5 into discordjs:main Jul 26, 2022
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

3 participants