From f198779b819992ec0a2fa45c11547532895ec31e Mon Sep 17 00:00:00 2001 From: Nat1anWasTaken Date: Sun, 9 Jun 2024 23:43:38 +0800 Subject: [PATCH] feat(lava/cogs/commands.py): update track retrieval logic for local sources and Lavalink --- lava/cogs/commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lava/cogs/commands.py b/lava/cogs/commands.py index 47670e1b..208be1c2 100644 --- a/lava/cogs/commands.py +++ b/lava/cogs/commands.py @@ -157,12 +157,12 @@ async def play(self, interaction: ApplicationCommandInteraction, query: str, ind interaction.guild.id ) - results: LoadResult = await player.node.get_tracks(query) + results: LoadResult = await self.bot.lavalink.get_local_tracks(query) # Check locals if not results or not results.tracks: - self.bot.logger.info("No results found with lavalink for query %s, checking local sources", query) - results: LoadResult = await self.bot.lavalink.get_local_tracks(query) + self.bot.logger.info("No results found with local sources for query %s, checking on lavalink", query) + results: LoadResult = await player.node.get_tracks(query) if not results or not results.tracks: # If nothing was found return await interaction.edit_original_response(