force markdown and better fix for the genius bug
This commit is contained in:
parent
775cd7df26
commit
d0619fa950
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,9 @@ from lyricsgenius import Genius
|
||||||
from utils.core import ligneFormatage, userOrNick, load
|
from utils.core import ligneFormatage, userOrNick, load
|
||||||
from utils.time import nowCustom
|
from utils.time import nowCustom
|
||||||
|
|
||||||
|
from re import sub
|
||||||
genius = Genius(load(["TOKEN_GENIUS"])["TOKEN_GENIUS"])
|
genius = Genius(load(["TOKEN_GENIUS"])["TOKEN_GENIUS"])
|
||||||
|
genius.response_format = "markdown"
|
||||||
|
|
||||||
# Silence useless bug reports messages
|
# Silence useless bug reports messages
|
||||||
youtube_dl.utils.bug_reports_message = lambda: ''
|
youtube_dl.utils.bug_reports_message = lambda: ''
|
||||||
|
@ -507,7 +509,7 @@ class Music(commands.Cog):
|
||||||
except:
|
except:
|
||||||
await ctx.message.add_reaction(emoji = '❌')
|
await ctx.message.add_reaction(emoji = '❌')
|
||||||
return await message.edit(content = f"Pas de résultats trouvés pour `{song}`.")
|
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 = ""
|
lignetotal = ""
|
||||||
premierembed = True
|
premierembed = True
|
||||||
if len(paroles) > 7500:
|
if len(paroles) > 7500:
|
||||||
|
|
Reference in a new issue