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

feat: voice channel groups #147

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

VoiceConnections are now stored in a 2D map ({group_id -> {guild_id -> voice_connection}}).

The default global group ID is default - this is so the update is backwards compatible. Users may optionally specify their own group ID, e.g. the client ID, when creating their voice connections if they wish to run more than one bot in the process.

Also exposes two new methods:

Status and versioning classification:

codecov[bot] commented 3 years ago

Codecov Report

Merging #147 (a122845) into main (36aad8d) will increase coverage by 0.90%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   67.74%   68.65%   +0.90%     
==========================================
  Files          19       19              
  Lines         896      906      +10     
  Branches      214      221       +7     
==========================================
+ Hits          607      622      +15     
+ Misses        287      282       -5     
  Partials        2        2              
Impacted Files Coverage Δ
src/joinVoiceChannel.ts 100.00% <ø> (+100.00%) :arrow_up:
src/DataStore.ts 39.53% <100.00%> (+27.41%) :arrow_up:
src/VoiceConnection.ts 85.82% <100.00%> (ø)

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 36aad8d...a122845. Read the comment docs.