aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts
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/exts
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/exts')
-rw-r--r--bot/exts/easter/save_the_planet.py7
1 files changed, 3 insertions, 4 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: