mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
voice: pass joinConfig.group to getVoiceConnection (#7442)
This commit is contained in:
@@ -533,7 +533,7 @@ export class VoiceConnection extends TypedEmitter<VoiceConnectionEvents> {
|
||||
if (this.state.status === VoiceConnectionStatus.Destroyed) {
|
||||
throw new Error('Cannot destroy VoiceConnection - it has already been destroyed');
|
||||
}
|
||||
if (getVoiceConnection(this.joinConfig.guildId) === this) {
|
||||
if (getVoiceConnection(this.joinConfig.guildId, this.joinConfig.group) === this) {
|
||||
untrackVoiceConnection(this);
|
||||
}
|
||||
if (adapterAvailable) {
|
||||
@@ -692,7 +692,7 @@ export class VoiceConnection extends TypedEmitter<VoiceConnectionEvents> {
|
||||
*/
|
||||
export function createVoiceConnection(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions) {
|
||||
const payload = createJoinVoiceChannelPayload(joinConfig);
|
||||
const existing = getVoiceConnection(joinConfig.guildId);
|
||||
const existing = getVoiceConnection(joinConfig.guildId, joinConfig.group);
|
||||
if (existing && existing.state.status !== VoiceConnectionStatus.Destroyed) {
|
||||
if (existing.state.status === VoiceConnectionStatus.Disconnected) {
|
||||
existing.rejoin({
|
||||
|
||||
Reference in New Issue
Block a user