force markdown and better fix for the genius bug

This commit is contained in:
Mylloon 2021-07-29 12:26:25 +02:00
parent 775cd7df26
commit d0619fa950

View file

@ -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: