From a6a7eb07bc4ff9d76aab78436de5131d61f4b8b4 Mon Sep 17 00:00:00 2001 From: Milka64 Date: Fri, 29 Dec 2023 10:24:03 +0100 Subject: [PATCH] WIP #51 --- .gitlab-ci.yml | 2 +- kabot/kabot/utils/audio.py | 14 +++++++------- kabot/setup.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d8ee73..f34345e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: variables: GL_TOKEN: $GL_TOKEN - VERSION: '0.2.4' + VERSION: '0.2.5' deploy: stage: deploy diff --git a/kabot/kabot/utils/audio.py b/kabot/kabot/utils/audio.py index 1384a4d..fee3bf1 100644 --- a/kabot/kabot/utils/audio.py +++ b/kabot/kabot/utils/audio.py @@ -272,13 +272,13 @@ class Audio(commands.Cog, name="Commandes Audio"): @commands.command() async def find(self, ctx, query): """Cherche un son dans la bibliothèque""" - if query: - query = query.lower() - audio_files = [f for f in Path(self.audio_path + '/').glob('**/*.mp3') if query in str(f).lower()] - if not audio_files: - await ctx.channel.send("%s not found" % query) - else: - await ctx.channel.send("\n".join(audio_files)) + query = query.lower() + audio_files = [f for f in Path(self.audio_path + '/').glob('**/*.mp3') if query in str(f).lower()] + if not audio_files: + await ctx.channel.send("%s not found" % query) + else: + for file in audio_files: + await ctx.channel.send("```"+str(file)+"```") @commands.command() async def joke(self, ctx, folder=None): diff --git a/kabot/setup.py b/kabot/setup.py index 243ee57..649d6cf 100644 --- a/kabot/setup.py +++ b/kabot/setup.py @@ -61,6 +61,6 @@ setup( test_suite='tests', tests_require=test_requirements, url='https://github.com/None/kabot', - version='0.2.4', + version='0.2.5', zip_safe=False, )