From 5ca258ef4feb323aefa35da12d6e2549cd7b5007 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 29 Jul 2021 20:42:08 +0200 Subject: [PATCH] remove parenthesis in the is playing state in lyrics --- src/cogs/music.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cogs/music.py b/src/cogs/music.py index 9ed9af9..d841112 100644 --- a/src/cogs/music.py +++ b/src/cogs/music.py @@ -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)