From 275994d90f18c5f03de6cf0b699e178f8908b478 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 11 Dec 2020 14:31:00 +0100 Subject: [PATCH] fix description news --- cogs/internet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/internet.py b/cogs/internet.py index 8370ffb..6e05a08 100644 --- a/cogs/internet.py +++ b/cogs/internet.py @@ -177,7 +177,8 @@ class Internet(commands.Cog): info = choice([newsfeed.entries[i] for i in range(0, 10 if len(newsfeed.entries) > 10 else len(newsfeed.entries))]) desc = f"\n\n{info.description}" - embed = discord.Embed(title = info.title, color = randint(0, 0xFFFFFF), description = f"[**lien de la news**]({info.link}){'' if '

' in desc else desc}") + final_desc = "Pas de description trouvée." if "

" in desc or "" in desc else desc + embed = discord.Embed(title = info.title, color = randint(0, 0xFFFFFF), description = f"[**lien de la news**]({info.link}){final_desc}") embed.set_author(name = info.author) embed.set_footer(text = f"News de {choix_site.capitalize()}") #embed.set_image(url = submission.url)