diff options
Diffstat (limited to 'bot')
-rw-r--r-- | bot/exts/easter/save_the_planet.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bot/exts/easter/save_the_planet.py b/bot/exts/easter/save_the_planet.py index 99f06bbc..8f644259 100644 --- a/bot/exts/easter/save_the_planet.py +++ b/bot/exts/easter/save_the_planet.py @@ -4,9 +4,11 @@ from pathlib import Path from discord import Embed from discord.ext import commands -from bot.utils import RandomCycle +from bot.utils.randomization import RandomCycle -EMBED_DATA = [] + +with Path("bot/resources/easter/save_the_planet.json").open('r', encoding='utf8') as f: + EMBED_DATA = RandomCycle(json.load(f)) class SaveThePlanet(commands.Cog): @@ -15,10 +17,6 @@ class SaveThePlanet(commands.Cog): def __init__(self, bot: commands.Bot) -> None: self.bot = bot - with Path("bot/resources/easter/save_the_planet.json").open('r', encoding='utf8') as f: - global EMBED_DATA - EMBED_DATA = RandomCycle(json.load(f)) - @commands.command(aliases=('savetheearth', 'saveplanet', 'saveearth')) async def savetheplanet(self, ctx: commands.Context) -> None: """Responds with a random tip on how to be eco-friendly and help our planet.""" |