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

VoiceReceiver constructor should probably be marked @internal #190

Open iliazeus opened 2 years ago

iliazeus commented 2 years ago

Please describe the problem you are having in as much detail as possible:

Upgrading from 0.5.x versions, changing createVoiceRecevier(connection) to new VoiceReceiver(connection) seemed to be the logical choice. However, the only VoiceReceiver that works with a given connection seems to be the VoiceConnection.receiver.

I suggest marking the VoiceReceiver constructor as @internal, to avoid confusion.

Include a reproducible code sample here, if possible:

const r1 = new VoiceReceiver(voiceConnection);
r1.speaking.on("start", () => console.log("never gets called"));

const r2 = voiceConnection.receiver;
r2.speaking.on("start", () => console.log("but this one does"));

Further details:

Relevant client options: