From 5db5100290139fc66e85aaba2aa8314f336c8b0a Mon Sep 17 00:00:00 2001 From: Anubhav1603 Date: Sun, 27 Sep 2020 14:37:13 +0530 Subject: rewritten code of error method in better manner --- bot/exts/valentines/valentine_zodiac.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bot') 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 -- cgit v1.2.3