diff options
author | 2020-09-25 18:18:09 +0530 | |
---|---|---|
committer | 2020-09-25 18:18:09 +0530 | |
commit | 9319667c648cb6c837ed4fb55af0ae375f246fa3 (patch) | |
tree | 2b2415e3d8ff1a758d6b3b0a874de545198c6f61 | |
parent | Update bot/exts/valentines/valentine_zodiac.py (diff) |
changed month name to calender
Co-authored-by: Rohan Reddy Alleti <[email protected]>
-rw-r--r-- | bot/exts/valentines/valentine_zodiac.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/valentines/valentine_zodiac.py index 8c051ebe..7e38dcc0 100644 --- a/bot/exts/valentines/valentine_zodiac.py +++ b/bot/exts/valentines/valentine_zodiac.py @@ -88,10 +88,10 @@ class ValentineZodiac(commands.Cog): """Provides information about zodiac sign by taking month and date as input.""" if isinstance(month, str): month = month.capitalize() - if month in MONTH_NAME.keys(): - month = MONTH_NAME[month] - else: - await ctx.send("Sorry, but you have given wrong Month name") + try: + month = list(calendar.month_abbr).index(month[:3]) + except ValueError: + await ctx.send("Sorry, but you have given wrong month name.") return if month == 1 or month == 12: if date >= 1 and date <= 19 or date >= 22 and date <= 31: |