aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar Chris Gallardo <[email protected]>2020-10-03 17:22:24 -0700
committerGravatar GitHub <[email protected]>2020-10-03 17:22:24 -0700
commitdae123f9de268604cbe933479de87ea5e5f64a67 (patch)
treefc4ea9d2b1348091ad6a5dfe1076eaca1059066c /bot
parentMerge branch 'master' into save_the_planet (diff)
Apply suggestions from @gustavwilliam's code review
Co-authored-by: gustavwilliam <[email protected]>
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/easter/save_the_planet.py7
-rw-r--r--bot/resources/easter/save_the_planet.json6
2 files changed, 6 insertions, 7 deletions
diff --git a/bot/exts/easter/save_the_planet.py b/bot/exts/easter/save_the_planet.py
index 46bcb514..41a9e25d 100644
--- a/bot/exts/easter/save_the_planet.py
+++ b/bot/exts/easter/save_the_planet.py
@@ -9,13 +9,12 @@ from discord.ext import commands
class SaveThePlanet(commands.Cog):
"""A cog that teaches users how they can help our planet."""
- embed_data = []
-
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
+ self.embed_data = []
+
with open(Path("bot/resources/easter/save_the_planet.json"), 'r', encoding='utf8') as f:
- for embed in json.load(f):
- self.embed_data.append(embed)
+ self.embed_data = [embed for embed in json.load(f)]
@commands.command(aliases=('savetheearth', 'saveplanet', 'saveearth'))
async def savetheplanet(self, ctx: commands.Context) -> None:
diff --git a/bot/resources/easter/save_the_planet.json b/bot/resources/easter/save_the_planet.json
index 816611c4..f22261b7 100644
--- a/bot/resources/easter/save_the_planet.json
+++ b/bot/resources/easter/save_the_planet.json
@@ -1,6 +1,6 @@
[
{
- "title": "Choose reneweable energy",
+ "title": "Choose renewable energy",
"image": {"url": "https://cdn.dnaindia.com/sites/default/files/styles/full/public/2019/07/23/851602-renewable-energy-istock-072419.jpg"},
"footer": {"text": "Help out by sharing this information!"},
"fields": [
@@ -31,7 +31,7 @@
{
"name": "What you can do",
- "value": "Make sure you only use paper when absolutely neccesary. When you do, make sure to use recycled paper because making new paper causes pollution. Find ways to plant trees (Hacktober Fest!) to combat losing them.",
+ "value": "Make sure you only use paper when absolutely necessary. When you do, make sure to use recycled paper because making new paper causes pollution. Find ways to plant trees (Hacktober Fest!) to combat losing them.",
"inline": false
}
]
@@ -50,7 +50,7 @@
{
"name": "What you can do",
- "value": "Instead of using your car, ride your bike if possible! Not only does it save that pound of C0₂, it is also great excercise and is cheaper!",
+ "value": "Instead of using your car, ride your bike if possible! Not only does it save that pound of C0₂, it is also great exercise and is cheaper!",
"inline": false
}
]