This commit is contained in:
Milka64 2023-12-28 17:10:52 +01:00
parent c3e590fd2c
commit 012feae29c
3 changed files with 14 additions and 2 deletions

View file

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

View file

@ -199,6 +199,7 @@ class Audio(commands.Cog, name="Commandes Audio"):
@commands.command()
async def welcome(self, ctx, user=None):
"""Joue le son d'accueil de l'utilisateur"""
if not user:
user = ctx.message.author.name
try:
@ -268,6 +269,17 @@ class Audio(commands.Cog, name="Commandes Audio"):
await ctx.voice_client.disconnect()
@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))
@commands.command()
async def joke(self, ctx, folder=None):
"""Joue un son (aléatoire par défaut)"""

View file

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