From 2d3ff4ea1a9a8419553643a6dfb7b843ebe17042 Mon Sep 17 00:00:00 2001 From: itsTheFae Date: Fri, 8 Dec 2023 19:53:42 -0800 Subject: [PATCH] check for paused players over just active players. --- musicbot/bot.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/musicbot/bot.py b/musicbot/bot.py index e1395dfdc..0fb4b543a 100644 --- a/musicbot/bot.py +++ b/musicbot/bot.py @@ -910,14 +910,19 @@ async def update_now_playing_status(self): if not self.config.status_message: entry = None paused = False - activeplayers = sum(1 for p in self.players.values() if p.is_playing) - if activeplayers > 1: + activeplayers = [p for p in self.players.values() if p.is_playing] + if len(activeplayers) > 1: game = discord.Game( type=0, name="music on %s guilds" % activeplayers ) - elif activeplayers == 1: - player = discord.utils.get(self.players.values(), is_playing=True) + elif len(activeplayers) == 1: + player = activeplayers[0] + paused = player.is_paused + entry = player.current_entry + + elif len(self.players): + player = list(self.players.values())[0] paused = player.is_paused entry = player.current_entry