discordjs / voice

Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Apache License 2.0
327 stars 111 forks source link

fix(VoiceConnection): disconnect method now actually disconnects #140

Closed amishshah closed 3 years ago

amishshah commented 3 years ago

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

Resolves #138.

Calling VoiceConnection#disconnect() didn't actually send the correct voice state update packet to Discord. This has been fixed to null the channelId before sending the packet, and a test exposing this has been added.

Status and versioning classification:

codecov[bot] commented 3 years ago

Codecov Report

Merging #140 (e86676a) into main (daf9e29) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   67.70%   67.74%   +0.03%     
==========================================
  Files          19       19              
  Lines         895      896       +1     
  Branches      214      214              
==========================================
+ Hits          606      607       +1     
  Misses        287      287              
  Partials        2        2              
Impacted Files Coverage Δ
src/VoiceConnection.ts 85.82% <100.00%> (+0.10%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update daf9e29...e86676a. Read the comment docs.