diff options
| author | 2021-05-03 13:36:26 -0400 | |
|---|---|---|
| committer | 2021-05-03 13:36:26 -0400 | |
| commit | e9f33306b5344c5d7e0877b0bf63ff9c914e6f85 (patch) | |
| tree | 3584c00627bbf498ab6673dfd9807ee219501dba /bot/exts/easter/save_the_planet.py | |
| parent | chore: Clean Up the Valentines Season (diff) | |
Clean Up the Easter Season
- Keep Consistent setup docstrings
- Type hint to bot.Bot instead of commands.Bot
- Don't set Cog.bot if it isn't used
Diffstat (limited to 'bot/exts/easter/save_the_planet.py')
| -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 8f644259..db9d3498 100644 --- a/bot/exts/easter/save_the_planet.py +++ b/bot/exts/easter/save_the_planet.py @@ -4,6 +4,7 @@ from pathlib import Path  from discord import Embed  from discord.ext import commands +from bot.bot import Bot  from bot.utils.randomization import RandomCycle @@ -14,9 +15,6 @@ with Path("bot/resources/easter/save_the_planet.json").open('r', encoding='utf8'  class SaveThePlanet(commands.Cog):      """A cog that teaches users how they can help our planet.""" -    def __init__(self, bot: commands.Bot) -> None: -        self.bot = bot -      @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.""" @@ -24,6 +22,6 @@ class SaveThePlanet(commands.Cog):          await ctx.send(embed=return_embed) -def setup(bot: commands.Bot) -> None: -    """Save the Planet Cog load.""" -    bot.add_cog(SaveThePlanet(bot)) +def setup(bot: Bot) -> None: +    """Load the Save the Planet Cog.""" +    bot.add_cog(SaveThePlanet())  |