aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-02-21 20:43:31 +0100
committerGravatar GitHub <[email protected]>2019-02-21 20:43:31 +0100
commit9204d22c2463e6bd0f845b79db492f443d6b6e97 (patch)
tree61663fbff7a4f0c6dd2f73c7dd79ae5645bbaef3
parentMerge pull request #121 from python-discord/emoji-update (diff)
parentUpdate whoisvalentine.py to address requested changes (diff)
Merge pull request #122 from darthdelay/whoisvalentine
Add .who_is_valentine and .valentine_facts
-rw-r--r--bot/resources/valentines/valentine_facts.json24
-rw-r--r--bot/seasons/valentines/whoisvalentine.py53
2 files changed, 77 insertions, 0 deletions
diff --git a/bot/resources/valentines/valentine_facts.json b/bot/resources/valentines/valentine_facts.json
new file mode 100644
index 00000000..d2ffa980
--- /dev/null
+++ b/bot/resources/valentines/valentine_facts.json
@@ -0,0 +1,24 @@
+{
+ "whois": "Saint Valentine, officially Saint Valentine of Rome, was a widely recognized 3rd-century christian saint, commemorated on February 14. He was a priest and bishop, ministering persecuted Christians in the Roman Empire, and is associated with a tradition of courtly love since the High Middle Ages, a period commenced around the year 1000AD and lasting until around 1250AD. He was martyred and buried at a Christian cemetery on the Via Flaminia on February 14.\n\nThere are a bunch of inconsistencies in the identification of the saint, however there are evidences for 3 saints that appear in connection with February 14. One of them, Saint Valentine of Terni, is believed to be the one associated with a vision restoration miracle, which happening during his imprisonment. In that, he restored the eyesight of his jailer's daughter, and, on the evening before his execution, supposedly sent her a letter signed with 'Your Valentine' (tuum valentinum). This makes this saint the one we today associate with Saint Valentine's Day.\n\nThe artist Cicero Moraes attempted a facial reconstruction of Saint Valentine, which can be seen in the thumbnail.",
+ "titles": [
+ "\u2764 Facts \u00e1 la carte \u2764",
+ "\u2764 Would you like some cheese with your wi... facts? \u2764",
+ "\u2764 Facts to raise your pulse \u2764",
+ "\u2764 Love Facts, Episode #42 \u2764",
+ "\u2764 It's a fact not a fact, duh \u2764",
+ "\u2764 Candlelight din... facts! \u2764"
+ ],
+ "text": [
+ "The expression 'From your Valentine' derives from a legend in which Saint Valentine, imprisoned after persecution and not wanting to convert to Roman paganism, performed a miracle on Julia, his jailer Asterius's blind daughter, restoring her eyesight. On the evening before his execution, he is supposed to have written a letter to the jailers daughter, signing as 'Your Valentine' (tuum valentinum).",
+ "Valentine's Day wasn't really associated with anything romantic, until the 14th century England where it's association with romantic love had begun from within the circle of Geoffrey Chaucer, a famous english poet and author, also called 'Father of English literature' for his work. He is best known for 'The Caunterbury Tales', a collection of 24 stories, which are presented as part of a story-telling contest by a group of pilgrims on their travel from London to Canterbury.",
+ "It's only been roughly 300 years, that the Valentine's Day evolved into what we know today.",
+ "The wide usage of hearts on Valentine's day derived from a legend, in which Saint Valentine cut hearts from parchment, giving them to persecuted Christians and soldiers married by him. He did that \"to remind these man of their vows and God's love\"",
+ "In 1797, a British publisher developed \"The Young Man's Valentine Writer\", to assist young men in composing their own sentimental verses to ladies they felt attracted to.",
+ "If you've never gotten any handwritten Valentine cards, this may be due to the fact, that in the 19th century, handwritten notes have given away to mass-produced greeting cards.",
+ "In 1868, a British chocolate company called Cadbury created so called 'Fancy Boxes', which essentially were a decorated box of chocolates in the shape of a heart. This set a trend, such that these boxes were quickly associated with Valentine's Day.",
+ "Roses are red,\nviolet's are blue,\nI can't rhyme,\nbut I still do.\n\u200b\nThis poem in particular,\nit will stay forever,\nderives from The Faerie Queene,\nan epic poem you probably have never seen.\n\n\"She bath'd with roses red, and violets blew,\nAnd all the sweetest flowres, that in the forrest grew.\"\n\nThese verses, with most immense sway,\nlead to the poem we still hear today.",
+ "The earliest Valentine poem known is a rondeau, a form of medieval/renaissance French poetry, composed by Charles, Duke of Orl\u00e9ans to his wife:\n\n\"Je suis desja d'amour tann\u00e9,\nMa tres doulce Valentin\u00e9e\"",
+ "There's a form of cryptological communication called 'Floriography', in which you communicate through flowers. Meaning has been attributed to flowers for thousands of years, and some form of floriography has been practiced in traditional cultures throughout Europe, Asia, and Africa. Here are some meanings for roses you might want to take a look at, if you plan on gifting your loved one a bouquet of roses on Valentine's Day:\n\u200b\nRed: eternal love\nPink: young, developing love\nWhite: innocence, fervor, loyalty\nOrange: happiness, security\nViolet: love at first sight\nBlue: unfulfilled longing, quiet desire\nYellow: friendship, jealousy, envy, infidelity\nBlack: unfulfilled longing, quiet desire, grief, hatred, misfortune, death",
+ "Traditionally, young girls in the U.S. and the U.K. believed they could tell what type of man they would marry depending on the type of bird they saw first on Valentine's Day. If they saw a blackbird, they would marry a clergyman, a robin redbreast indicated a sailor, and a goldfinch indicated a rich man. A sparrow meant they would marry a farmer, a bluebird indicated a happy man, and a crossbill meant an argumentative man. If they saw a dove, they would marry a good man, but seeing a woodpecker meant they would not marry at all."
+ ]
+} \ No newline at end of file
diff --git a/bot/seasons/valentines/whoisvalentine.py b/bot/seasons/valentines/whoisvalentine.py
new file mode 100644
index 00000000..2fe07aba
--- /dev/null
+++ b/bot/seasons/valentines/whoisvalentine.py
@@ -0,0 +1,53 @@
+import json
+import logging
+from pathlib import Path
+from random import choice
+
+import discord
+from discord.ext import commands
+
+from bot.constants import Colours
+
+log = logging.getLogger(__name__)
+
+with open(Path("bot", "resources", "valentines", "valentine_facts.json"), "r") as file:
+ FACTS = json.load(file)
+
+
+class ValentineFacts:
+ def __init__(self, bot):
+ self.bot = bot
+
+ @commands.command(aliases=('whoisvalentine', 'saint_valentine'))
+ async def who_is_valentine(self, ctx):
+ """
+ Displays info about Saint Valentine.
+ """
+ embed = discord.Embed(
+ title="Who is Saint Valentine?",
+ description=FACTS['whois'],
+ color=Colours.pink
+ )
+ embed.set_thumbnail(
+ url='https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Saint_Valentine_-_'
+ 'facial_reconstruction.jpg/1024px-Saint_Valentine_-_facial_reconstruction.jpg'
+ )
+
+ await ctx.channel.send(embed=embed)
+
+ @commands.command()
+ async def valentine_fact(self, ctx):
+ """
+ Shows a random fact about Valentine's Day.
+ """
+ embed = discord.Embed(
+ title=choice(FACTS['titles']),
+ description=choice(FACTS['text']),
+ color=Colours.pink
+ )
+
+ await ctx.channel.send(embed=embed)
+
+
+def setup(bot):
+ bot.add_cog(ValentineFacts(bot))