From 3a891612bc68603a44b5a6884cf105c53631bc7f Mon Sep 17 00:00:00 2001 From: Draper <27962761+Drapersniper@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:03:23 +0100 Subject: [PATCH] account for config changes Signed-off-by: Draper <27962761+Drapersniper@users.noreply.github.com> --- redbot/cogs/audio/core/tasks/startup.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/redbot/cogs/audio/core/tasks/startup.py b/redbot/cogs/audio/core/tasks/startup.py index 9611e3682267..d338e3f429f2 100644 --- a/redbot/cogs/audio/core/tasks/startup.py +++ b/redbot/cogs/audio/core/tasks/startup.py @@ -96,12 +96,22 @@ async def restore_players(self) -> None: async for guild_id, guild_data in AsyncIter(all_guilds.items(), steps=100): if guild_data["auto_play"]: if guild_data["currently_auto_playing_in"]: - notify_channel, vc_id, paused, volume = guild_data["currently_auto_playing_in"] + if len(guild_data["currently_auto_playing_in"]) == 4: + notify_channel, vc_id, paused, volume = guild_data[ + "currently_auto_playing_in" + ] + else: + notify_channel, vc_id = guild_data["currently_auto_playing_in"] + paused, volume = False, all_guilds[guild_id]["volume"] metadata[guild_id] = (notify_channel, vc_id, paused, volume) if guild_data["last_known_vc_and_notify_channels"]: - notify_channel, vc_id, paused, volume = guild_data[ - "last_known_vc_and_notify_channels" - ] + if len(guild_data["last_known_vc_and_notify_channels"]) == 4: + notify_channel, vc_id, paused, volume = guild_data[ + "last_known_vc_and_notify_channels" + ] + else: + notify_channel, vc_id = guild_data["last_known_vc_and_notify_channels"] + paused, volume = False, all_guilds[guild_id]["volume"] if vc_id: metadata[guild_id] = (notify_channel, vc_id, paused, volume) if guild_data["last_known_track"]: