From 479b23f0f33ff960f985e5c38f840472d782df90 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 1 Oct 2020 09:24:26 -0400 Subject: [PATCH 1/2] Get love image right (when cert is fixed) --- lovecalculator/lovecalculator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lovecalculator/lovecalculator.py b/lovecalculator/lovecalculator.py index 94b6d49..fba6500 100644 --- a/lovecalculator/lovecalculator.py +++ b/lovecalculator/lovecalculator.py @@ -60,14 +60,14 @@ class LoveCalculator(Cog): else: emoji = "💔" title = f"Dr. Love says that the love percentage for {x} and {y} is: {emoji} {description} {emoji}" - except: + except (TypeError, ValueError): title = "Dr. Love has left a note for you." em = discord.Embed( title=title, description=result_text, color=discord.Color.red(), - url=f"https://www.lovecalculator.com/{result_image}", + url=url ) - + em.set_image(url=f"https://www.lovecalculator.com/{result_image}") await ctx.send(embed=em) From 5752ba605637da4005763e0f55aeab4f229d29af Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 1 Oct 2020 09:25:16 -0400 Subject: [PATCH 2/2] Black formatting --- lovecalculator/lovecalculator.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lovecalculator/lovecalculator.py b/lovecalculator/lovecalculator.py index fba6500..20504bd 100644 --- a/lovecalculator/lovecalculator.py +++ b/lovecalculator/lovecalculator.py @@ -64,10 +64,7 @@ class LoveCalculator(Cog): title = "Dr. Love has left a note for you." em = discord.Embed( - title=title, - description=result_text, - color=discord.Color.red(), - url=url + title=title, description=result_text, color=discord.Color.red(), url=url ) em.set_image(url=f"https://www.lovecalculator.com/{result_image}") await ctx.send(embed=em)