remove parenthesis in the is playing state in lyrics

This commit is contained in:
Mylloon 2021-07-29 20:42:08 +02:00
parent f46165da55
commit 5ca258ef4f

View file

@ -496,7 +496,7 @@ class Music(commands.Cog):
"""Affiche les paroles de la musique en cours, ou de la chanson spécifiée.\n ➡ Syntaxe: {PREFIX}lyrics/lyric/l (musique)"""
if song or ctx.voice_state.is_playing:
if not song:
song = f"{ctx.voice_state.current.title()}"
song = sub(r"(\ )?\(.*\)", "", ctx.voice_state.current.title())
if " romanized" in song:
message = await ctx.send(f":mag: **Cherche les paroles romanisées de ** `{song.replace(' romanized', '')}`")
else:
@ -554,5 +554,5 @@ class Music(commands.Cog):
@commands.command(name='lyricsromanized', aliases = ['lr', 'lyricromanized'], hidden = True)
async def _lyricsromanized(self, ctx, *, song: str = None):
if not song and ctx.voice_state.is_playing:
song = f"{ctx.voice_state.current.title()}"
song = sub(r"(\ )?\(.*\)", "", ctx.voice_state.current.title())
await ctx.invoke(self.client.get_command("lyrics"), song = f"{song} romanized" if song else song)