diff options
| -rw-r--r-- | bot/seasons/easter/__init__.py | 17 | ||||
| -rw-r--r-- | bot/seasons/valentines/savethedate.py | 23 |
2 files changed, 29 insertions, 11 deletions
diff --git a/bot/seasons/easter/__init__.py b/bot/seasons/easter/__init__.py new file mode 100644 index 00000000..bfad772d --- /dev/null +++ b/bot/seasons/easter/__init__.py @@ -0,0 +1,17 @@ +from bot.seasons import SeasonBase + + +class Easter(SeasonBase): + """ + Easter is a beautiful time of the year often celebrated after the first Full Moon of the new spring season. + This time is quite beautiful due to the colorful flowers coming out to greet us. So. let's greet Spring + in an Easter celebration of contributions. + """ + + name = "easter" + bot_name = "BunnyBot" + greeting = "Happy Easter to us all!" + + # Duration of season + start_date = "01/04" + end_date = "30/04" diff --git a/bot/seasons/valentines/savethedate.py b/bot/seasons/valentines/savethedate.py index b9484be9..f460283a 100644 --- a/bot/seasons/valentines/savethedate.py +++ b/bot/seasons/valentines/savethedate.py @@ -12,6 +12,9 @@ log = logging.getLogger(__name__) HEART_EMOJIS = [":heart:", ":gift_heart:", ":revolving_hearts:", ":sparkling_heart:", ":two_hearts:"] +with open(Path('bot', 'resources', 'valentines', 'date_ideas.json'), 'r', encoding="utf8") as f: + VALENTINES_DATES = load(f) + class SaveTheDate: """ @@ -26,17 +29,15 @@ class SaveTheDate: """ Gives you ideas for what to do on a date with your valentine. """ - with open(Path('bot', 'resources', 'valentines', 'date_ideas.json'), 'r', encoding="utf8") as f: - valentine_dates = load(f) - random_date = random.choice(valentine_dates['ideas']) - emoji_1 = random.choice(HEART_EMOJIS) - emoji_2 = random.choice(HEART_EMOJIS) - embed = discord.Embed( - title=f"{emoji_1}{random_date['name']}{emoji_2}", - description=f"{random_date['description']}", - colour=Colours.pink - ) - await ctx.send(embed=embed) + random_date = random.choice(VALENTINES_DATES['ideas']) + emoji_1 = random.choice(HEART_EMOJIS) + emoji_2 = random.choice(HEART_EMOJIS) + embed = discord.Embed( + title=f"{emoji_1}{random_date['name']}{emoji_2}", + description=f"{random_date['description']}", + colour=Colours.pink + ) + await ctx.send(embed=embed) def setup(bot): |