From d0619fa95066a999af7f0adbad193da1ea0d86dd Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 29 Jul 2021 12:26:25 +0200 Subject: [PATCH] force markdown and better fix for the genius bug --- src/cogs/music.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cogs/music.py b/src/cogs/music.py index 0493898..9ed9af9 100644 --- a/src/cogs/music.py +++ b/src/cogs/music.py @@ -22,7 +22,9 @@ from lyricsgenius import Genius from utils.core import ligneFormatage, userOrNick, load from utils.time import nowCustom +from re import sub genius = Genius(load(["TOKEN_GENIUS"])["TOKEN_GENIUS"]) +genius.response_format = "markdown" # Silence useless bug reports messages youtube_dl.utils.bug_reports_message = lambda: '' @@ -507,7 +509,7 @@ class Music(commands.Cog): except: await ctx.message.add_reaction(emoji = '❌') return await message.edit(content = f"Pas de résultats trouvés pour `{song}`.") - paroles.replace("EmbedShare URLCopyEmbedCopy", "") # Fix temporaire bug Genius + paroles = sub(r"3?EmbedShare URLCopyEmbedCopy", "", paroles) # Fix temporaire bug Genius lignetotal = "" premierembed = True if len(paroles) > 7500: