to help with debugging

This commit is contained in:
Drapersniper
2020-10-12 17:50:36 +01:00
parent c6a450b9da
commit 8cbf17bebf

View File

@@ -75,6 +75,9 @@ class StartUpTasks(MixinMeta, metaclass=CompositeMetaClass):
guild_id, await self.config.guild(guild).persist_queue() guild_id, await self.config.guild(guild).persist_queue()
) )
if not persist_cache: if not persist_cache:
log.warning(
f"Failed to restore player for {guild_id} - Persistent cache is disabled."
)
await self.api_interface.persistent_queue_api.drop(guild_id) await self.api_interface.persistent_queue_api.drop(guild_id)
continue continue
if self.lavalink_connection_aborted: if self.lavalink_connection_aborted:
@@ -104,10 +107,25 @@ class StartUpTasks(MixinMeta, metaclass=CompositeMetaClass):
except Exception as exc: except Exception as exc:
debug_exc_log(log, exc, "Failed to restore music voice channel") debug_exc_log(log, exc, "Failed to restore music voice channel")
if vc is None: if vc is None:
log.warning(
f"Failed to restore player for {guild_id} - Exception - {exc}."
)
break break
if tries >= 25 or guild is None or vc is None: if tries >= 25 or guild is None or vc is None:
await self.api_interface.persistent_queue_api.drop(guild_id) await self.api_interface.persistent_queue_api.drop(guild_id)
if tries >= 25:
log.warning(
f"Failed to restore player for {guild_id} - Unable to create player."
)
elif guild is None:
log.warning(
f"Failed to restore player for {guild_id} - Guild is no longer avaliable."
)
elif vc is None:
log.warning(
f"Failed to restore player for {guild_id} - VC no longer available."
)
continue continue
shuffle = await self.config.guild(guild).shuffle() shuffle = await self.config.guild(guild).shuffle()