From 2d893dbda20516366475a9082838e11f79339c8c Mon Sep 17 00:00:00 2001 From: Milka64 Date: Fri, 29 Dec 2023 10:34:41 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20limite=20=C3=A0=20la=20commande?= =?UTF-8?q?=20find=20#51?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- kabot/kabot/utils/audio.py | 4 ++-- kabot/setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f34345e..39806f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: variables: GL_TOKEN: $GL_TOKEN - VERSION: '0.2.5' + VERSION: '0.2.6' deploy: stage: deploy diff --git a/kabot/kabot/utils/audio.py b/kabot/kabot/utils/audio.py index fee3bf1..3ac1442 100644 --- a/kabot/kabot/utils/audio.py +++ b/kabot/kabot/utils/audio.py @@ -271,13 +271,13 @@ class Audio(commands.Cog, name="Commandes Audio"): @commands.command() async def find(self, ctx, query): - """Cherche un son dans la bibliothèque""" + """Cherche un son dans la bibliothèque (5 resultat max)""" 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: + for file in audio_files[:6]: await ctx.channel.send("```"+str(file)+"```") @commands.command() diff --git a/kabot/setup.py b/kabot/setup.py index 649d6cf..f868440 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.5', + version='0.2.6', zip_safe=False, )