discordjs / voice

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

feat(Secretbox): throw fallback error when no encryption package installed #130

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 #128.

If no valid encryption package is installed, the following error is now thrown (rather than the obscure error shown in #128):

    throw new Error(`Cannot play audio as no valid encryption package is installed.
    ^

Error: Cannot play audio as no valid encryption package is installed.
- Install sodium, libsodium-wrappers, or tweetnacl.
- Use the generateDependencyReport() function for more information.

Status and versioning classification:

codecov[bot] commented 3 years ago

Codecov Report

Merging #130 (07efcd3) into main (e9c3a94) will increase coverage by 0.41%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   66.25%   66.66%   +0.41%     
==========================================
  Files          19       19              
  Lines         880      882       +2     
  Branches      214      214              
==========================================
+ Hits          583      588       +5     
+ Misses        295      292       -3     
  Partials        2        2              
Impacted Files Coverage Δ
src/util/Secretbox.ts 57.89% <66.66%> (+22.60%) :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 e9c3a94...07efcd3. Read the comment docs.