diff options
author | 2020-09-27 14:37:13 +0530 | |
---|---|---|
committer | 2020-09-27 14:37:13 +0530 | |
commit | 5db5100290139fc66e85aaba2aa8314f336c8b0a (patch) | |
tree | 925ab65bd5bbfa445b628affe37492a6119ec283 /bot | |
parent | removed 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.py | 11 |
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 |