This commit is contained in:
Milka64 2023-12-29 10:24:03 +01:00
parent 012feae29c
commit a6a7eb07bc
3 changed files with 9 additions and 9 deletions

View file

@ -6,7 +6,7 @@ stages:
variables: variables:
GL_TOKEN: $GL_TOKEN GL_TOKEN: $GL_TOKEN
VERSION: '0.2.4' VERSION: '0.2.5'
deploy: deploy:
stage: deploy stage: deploy

View file

@ -272,13 +272,13 @@ class Audio(commands.Cog, name="Commandes Audio"):
@commands.command() @commands.command()
async def find(self, ctx, query): async def find(self, ctx, query):
"""Cherche un son dans la bibliothèque""" """Cherche un son dans la bibliothèque"""
if query: query = query.lower()
query = query.lower() audio_files = [f for f in Path(self.audio_path + '/').glob('**/*.mp3') if query in str(f).lower()]
audio_files = [f for f in Path(self.audio_path + '/').glob('**/*.mp3') if query in str(f).lower()] if not audio_files:
if not audio_files: await ctx.channel.send("%s not found" % query)
await ctx.channel.send("%s not found" % query) else:
else: for file in audio_files:
await ctx.channel.send("\n".join(audio_files)) await ctx.channel.send("```"+str(file)+"```")
@commands.command() @commands.command()
async def joke(self, ctx, folder=None): async def joke(self, ctx, folder=None):

View file

@ -61,6 +61,6 @@ setup(
test_suite='tests', test_suite='tests',
tests_require=test_requirements, tests_require=test_requirements,
url='https://github.com/None/kabot', url='https://github.com/None/kabot',
version='0.2.4', version='0.2.5',
zip_safe=False, zip_safe=False,
) )