3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-17 15:15:02 +00:00

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
This commit is contained in:
Nils Blömeke 2019-06-05 03:00:16 +02:00
parent 0f1ee84c46
commit b890b31d9c

View file

@ -649,7 +649,8 @@ export class UtilityPlugin extends ZeppelinPlugin<IUtilityPluginConfig> {
`) + 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 = <VoiceChannel>this.guild.channels.get(upToDateMember.voiceState.channelID);
if (voiceChannel || member.voiceState.mute || member.voiceState.deaf) {
embed.fields.push({
name: "Voice information",