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 end method in VoiceBroadcast #3194

Merged
merged 3 commits into from Apr 11, 2019

Conversation

Projects
None yet
4 participants
@thomasxd24
Copy link
Contributor

commented Apr 9, 2019

this.client is a ClientVoiceManager and thus its this.client.broadcasts instead of this.client.voice.broascasts

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

Status

  • 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

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.
fix end method in VoiceBroadcast
this.client is a ClientVoiceManager and thus its this.client.broadcasts  instead of this.client.voice.broascasts

@thomasxd24 thomasxd24 referenced this pull request Apr 9, 2019

Closed

VoiceBroadcast#end is not working properly #3193

1 of 1 task complete
@@ -67,8 +67,8 @@ class VoiceBroadcast extends EventEmitter {
*/
end() {
for (const dispatcher of this.dispatchers) this.delete(dispatcher);
const index = this.client.voice.broadcasts.indexOf(this);
if (index !== -1) this.client.voice.broadcasts.splice(index, 1);
const index = this.client.broadcasts.indexOf(this);

This comment has been minimized.

Copy link
@vladfrangu

vladfrangu Apr 9, 2019

Contributor

Can you rename the client variable to voiceManager, including updating the jsdocs in the constructor? That way it's correctly showing what it is

This comment has been minimized.

Copy link
@SpaceEEC

SpaceEEC Apr 9, 2019

Member

Or pass client when constructing VoiceBroadcast:

const broadcast = new VoiceBroadcast(this);

This comment has been minimized.

Copy link
@thomasxd24

thomasxd24 Apr 11, 2019

Author Contributor

i think its better to pass the client

This comment has been minimized.

Copy link
@thomasxd24

thomasxd24 Apr 11, 2019

Author Contributor

just change the pull to change the this.client
const broadcast = new VoiceBroadcast(this.client);

thomasxd24 added some commits Apr 11, 2019

@amishshah amishshah merged commit 8da1416 into discordjs:master Apr 11, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@thomasxd24 thomasxd24 deleted the thomasxd24:patch-1 branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.