aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rohan <[email protected]>2019-04-23 21:15:52 +0530
committerGravatar Rohan <[email protected]>2019-04-23 21:15:52 +0530
commite7e0e5d918dcb761cdfda2a2e3f02941973cff95 (patch)
tree69c8be1ff72fa420df5318dcd84b1e3381e0ad84
parentfixed lint errors (diff)
using top level array in json file
-rw-r--r--bot/resources/easter/easter_egg_facts.json6
-rw-r--r--bot/seasons/easter/egg_facts.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/bot/resources/easter/easter_egg_facts.json b/bot/resources/easter/easter_egg_facts.json
index c8f72c8d..7248045e 100644
--- a/bot/resources/easter/easter_egg_facts.json
+++ b/bot/resources/easter/easter_egg_facts.json
@@ -1,5 +1,4 @@
-{
- "facts": [
+[
"The first story of a rabbit (later named the \"Easter Bunny\") hiding eggs in a garden was published in 1680.",
"Rabbits are known to be prolific pro creators and are an ancient symbol of fertility and new life. The German immigrants brought the tale of Easter Bunny in the 1700s with the tradition of an egg-laying hare called ‘Osterhase\". The kids then would make nests in which the creature would lay coloured eggs. The tradition has been revolutionized in the form of candies and gifts instead of eggs.",
"In earlier days, a festival of egg throwing was held in church, when the priest would throw a hard-boiled egg to one of the choirboys. It was then tossed from one choirboy to the next and whoever held the egg when the clock struck 12 on Easter, was the winner and could keep it.",
@@ -18,5 +17,4 @@
"Medieval Easter eggs were boiled with onions to give them a golden sheen. Edward I, however, went one better and in 1290 he ordered 450 eggs to be covered in gold leaf and given as Easter gifts.",
"The first chocolate Easter egg was produced in 1873 by Fry\"s. Before this, people would give hollow cardboard eggs, filled with gifts.",
"John Cadbury soon followed suit and made his first Cadbury Easter egg in 1875. By 1892 the company was producing 19 different lines, all made from dark chocolate."
- ]
-} \ No newline at end of file
+]
diff --git a/bot/seasons/easter/egg_facts.py b/bot/seasons/easter/egg_facts.py
index dcc15078..c4cd8cf9 100644
--- a/bot/seasons/easter/egg_facts.py
+++ b/bot/seasons/easter/egg_facts.py
@@ -42,7 +42,7 @@ class EasterFacts(commands.Cog):
embed = discord.Embed()
embed.colour = Colours.soft_red
embed.title = 'Easter Egg Fact'
- random_fact = random.choice(self.facts['facts'])
+ random_fact = random.choice(self.facts)
embed.description = random_fact
return embed