From 199ab564b2c479bfbd40265dbf28ab3f606155c0 Mon Sep 17 00:00:00 2001 From: Oscar Andersson Date: Tue, 29 Aug 2023 21:05:28 +0200 Subject: [PATCH] chore: debug moving --- src/utils/helper.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/utils/helper.ts b/src/utils/helper.ts index c59a664..b2ee057 100644 --- a/src/utils/helper.ts +++ b/src/utils/helper.ts @@ -64,12 +64,16 @@ export class MoveerHelper { continue; } - this.rabbitMq.publishMoveMessage({ - isPatreon, - guild: user.guild, - guildMember: user, - toVoiceChannel, - }); + try { + await user.voice.setChannel(toVoiceChannel); + } catch (cause) { + logger.error({ cause, user, toVoiceChannel }, 'Failed to move user'); + errorMessages.push( + `Failed to move ${user} to ${toVoiceChannel} - Missing permissions?`, + ); + continue; + } + usersMoved++; totalUsersMoved++; }