🐛 Fix voice connection bug after summon #15 (#21)

This commit is contained in:
Manuel 2022-12-24 23:35:22 +01:00 committed by GitHub
parent 1e70209f2d
commit 92021dd94e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,9 @@ export class DiscordVoiceService {
member: GuildMember,
): GenericTryHandler {
if (this.voiceConnection !== undefined) {
this.logger.debug(
'Avoided joining the voice channel because voice connection is already defined',
);
return {
success: true,
reply: {},
@ -155,6 +158,7 @@ export class DiscordVoiceService {
}
this.voiceConnection.destroy();
this.voiceConnection = undefined;
return {
success: true,
reply: {},