-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Conversation
this.client is a ClientVoiceManager and thus its this.client.broadcasts instead of this.client.voice.broascasts
src/client/voice/VoiceBroadcast.js
Outdated
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename the client variable to voiceManager, including updating the jsdocs in the constructor? That way it's correctly showing what it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or pass client when constructing VoiceBroadcast
:
const broadcast = new VoiceBroadcast(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think its better to pass the client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just change the pull to change the this.client
const broadcast = new VoiceBroadcast(this.client);
* fix end method in VoiceBroadcast this.client is a ClientVoiceManager and thus its this.client.broadcasts instead of this.client.voice.broascasts * revert the voicebroadcast and pass this.client at clientvoice * passed this.client
This reverts commit 522fcd3.
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
Semantic versioning classification: