diff options
| author | 2020-10-01 21:12:12 +0530 | |
|---|---|---|
| committer | 2020-10-01 21:12:12 +0530 | |
| commit | c350c1c252d53e17c9ecd527760a345741a8ef46 (patch) | |
| tree | f711ebb7dd83cf0bd3612f8c052e3c419d147e58 | |
| parent | formated date and month of error in better way (diff) | |
modified error msg
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/valentines/valentine_zodiac.py | 18 | 
1 files changed, 10 insertions, 8 deletions
| diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/valentines/valentine_zodiac.py index 36572729..660bc092 100644 --- a/bot/exts/valentines/valentine_zodiac.py +++ b/bot/exts/valentines/valentine_zodiac.py @@ -44,14 +44,16 @@ class ValentineZodiac(commands.Cog):          """Returns error embed."""          embed = discord.Embed()          embed.color = Colours.soft_red -        error_comp = "\n".join( -            f"`{i}` {name}: {zodiac['start_at'].strftime('%B `%d`')} - {zodiac['end_at'].strftime('%B `%d`')}" -            for i, (name, zodiac) in enumerate(sorted(self.zodiac_fact.items()), start=1) -        ) -        embed.description = ( -            f"**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.\n" -            f"{error_comp}" -        ) +        error_msg = f"**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.\n" +        valid_zodiac_name = '' +        for name in sorted(self.zodiac_fact.keys()): +            if name == "Leo": +                valid_zodiac_name += f'{name}\n ' +            elif name == 'Virgo': +                valid_zodiac_name += name +            else: +                valid_zodiac_name += f'{name}, ' +        embed.description = error_msg + valid_zodiac_name          log.info("Invalid zodiac name provided.")          return embed | 
