Skip to content

Commit

Permalink
account for config changes
Browse files Browse the repository at this point in the history
Signed-off-by: Draper <[email protected]>
  • Loading branch information
Drapersniper committed Apr 1, 2022
1 parent e950ca1 commit 3a89161
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions redbot/cogs/audio/core/tasks/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit 3a89161

Please sign in to comment.