aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar Anubhav1603 <[email protected]>2020-09-27 14:37:13 +0530
committerGravatar Anubhav1603 <[email protected]>2020-09-27 14:37:13 +0530
commit5db5100290139fc66e85aaba2aa8314f336c8b0a (patch)
tree925ab65bd5bbfa445b628affe37492a6119ec283 /bot
parentremoved extra var from error method (diff)
rewritten code of error method in better manner
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/valentines/valentine_zodiac.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/valentines/valentine_zodiac.py
index 9315f304..5a03a9e4 100644
--- a/bot/exts/valentines/valentine_zodiac.py
+++ b/bot/exts/valentines/valentine_zodiac.py
@@ -42,10 +42,13 @@ class ValentineZodiac(commands.Cog):
"""Returns error embed."""
embed = discord.Embed()
embed.color = Colours.pink
- error_comp = ("\n").join([f"`{i}` {zod_name}"
- for i, zod_name in enumerate(self.zodiac_fact.keys(), start=1)])
- embed.description = f"""**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.
- {error_comp}"""
+ error_comp = "\n".join(
+ [f"`{i}` {zod_name}"for i, zod_name in enumerate(self.zodiac_fact.keys(), start=1)]
+ )
+ embed.description = (
+ f"**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.\n"
+ f"{error_comp}"
+ )
log.info("Wrong Zodiac name provided")
return embed