From b890b31d9c548e55d2ae117924b3cfc32685e6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Bl=C3=B6meke?= Date: Wed, 5 Jun 2019 03:00:16 +0200 Subject: [PATCH] Get a new VoiceState (Member) so it does not show outdated info Has been an issue more often than you would think and its really annoying --- src/plugins/Utility.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/Utility.ts b/src/plugins/Utility.ts index 607ec4f2..4df9b5eb 100644 --- a/src/plugins/Utility.ts +++ b/src/plugins/Utility.ts @@ -649,7 +649,8 @@ export class UtilityPlugin extends ZeppelinPlugin { `) + embedPadding, }); - const voiceChannel = member.voiceState.channelID ? this.guild.channels.get(member.voiceState.channelID) : null; + const upToDateMember = await resolveMember(this.bot, this.guild, user.id); + const voiceChannel = this.guild.channels.get(upToDateMember.voiceState.channelID); if (voiceChannel || member.voiceState.mute || member.voiceState.deaf) { embed.fields.push({ name: "Voice information",