From daf8b292e682e3b0a60a1ff9e9b43a0eec66ab1b Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 6 Feb 2021 17:53:02 +0100 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 99e5e108fc..0be366d2d2 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -1546,9 +1546,10 @@ module.exports = (_ => { (tooltip.setText = itemLayer.setText = newText => { if (BDFDB.ObjectUtils.is(config.guild)) { + let voiceChannels = LibraryModules.GuildChannelStore.getChannels(config.guild.id)[BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE].map(c => c.channel.id); let streamOwnerIds = LibraryModules.StreamUtils.getAllApplicationStreams().filter(app => app.guildId === config.guild.id).map(app => app.ownerId) || []; let streamOwners = streamOwnerIds.map(ownerId => LibraryModules.UserStore.getUser(ownerId)).filter(n => n); - let connectedUsers = Object.keys(LibraryModules.VoiceUtils.getVoiceStates(config.guild.id)).map(userId => !streamOwnerIds.includes(userId) && LibraryModules.UserStore.getUser(userId)).filter(n => n); + let connectedUsers = BDFDB.ObjectUtils.toArray(LibraryModules.VoiceUtils.getVoiceStates(config.guild.id)).map(state => voiceChannels.includes(state.channelId) && state.channelId != config.guild.afkChannelId && !streamOwnerIds.includes(state.userId) && LibraryModules.UserStore.getUser(state.userId)).filter(n => n); let tooltipText = config.guild.toString(); if (fontColorIsGradient) tooltipText = `${BDFDB.StringUtils.htmlEscape(tooltipText)}`; BDFDB.ReactUtils.render(BDFDB.ReactUtils.createElement(BDFDB.ReactUtils.Fragment, {