diff options
Diffstat (limited to 'bot/seasons/valentines/savethedate.py')
| -rw-r--r-- | bot/seasons/valentines/savethedate.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bot/seasons/valentines/savethedate.py b/bot/seasons/valentines/savethedate.py new file mode 100644 index 00000000..fbc9eb82 --- /dev/null +++ b/bot/seasons/valentines/savethedate.py @@ -0,0 +1,45 @@ +import logging +import random +from json import load +from pathlib import Path + +import discord +from discord.ext import commands + +from bot.constants import Colours + +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(commands.Cog): + """ + A cog that gives random suggestion, for a valentines date ! + """ + + def __init__(self, bot): + self.bot = bot + + @commands.command() + async def savethedate(self, ctx): + """ + Gives you ideas for what to do on a date with your valentine. + """ + 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): + bot.add_cog(SaveTheDate(bot)) + log.info("SaveTheDate cog loaded") |