Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

refactor: split states into a union of interfaces#76

Merged
amishshah merged 4 commits into
mainfrom
feat/state-split
Mar 13, 2021
Merged

refactor: split states into a union of interfaces#76
amishshah merged 4 commits into
mainfrom
feat/state-split

Conversation

@amishshah
Copy link
Copy Markdown
Member

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

Improves documentation for the various states of AudioPlayer, VoiceConnection, and Networking.

An refactor was made to AudioPlayer, where a state of a playable type is passed to the _preparePacket method. This allows it to increment the playbackDuration itself without having to perform a status assertion.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • This PR changes the library's interface (additional interfaces exported)

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 13, 2021

Codecov Report

Merging #76 (50d4575) into main (ced3102) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
- Coverage   29.81%   29.69%   -0.12%     
==========================================
  Files          15       15              
  Lines         597      596       -1     
  Branches      132      132              
==========================================
- Hits          178      177       -1     
  Misses        417      417              
  Partials        2        2              
Impacted Files Coverage Δ
src/VoiceConnection.ts 0.00% <ø> (ø)
src/networking/Networking.ts 3.93% <ø> (ø)
src/audio/AudioPlayer.ts 77.34% <100.00%> (-0.18%) ⬇️

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 ced3102...50d4575. Read the comment docs.

@amishshah amishshah merged commit e475b07 into main Mar 13, 2021
@amishshah amishshah deleted the feat/state-split branch March 13, 2021 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants