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/traditions.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/traditions.py')
| -rw-r--r-- | bot/exts/easter/traditions.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bot/exts/easter/traditions.py b/bot/exts/easter/traditions.py index 85b4adfb..19e69b98 100644 --- a/bot/exts/easter/traditions.py +++ b/bot/exts/easter/traditions.py @@ -5,6 +5,8 @@ from pathlib import Path from discord.ext import commands +from bot.bot import Bot + log = logging.getLogger(__name__) with open(Path("bot/resources/easter/traditions.json"), "r", encoding="utf8") as f: @@ -14,9 +16,6 @@ with open(Path("bot/resources/easter/traditions.json"), "r", encoding="utf8") as class Traditions(commands.Cog): """A cog which allows users to get a random easter tradition or custom from a random country.""" - def __init__(self, bot: commands.Bot): - self.bot = bot - @commands.command(aliases=('eastercustoms',)) async def easter_tradition(self, ctx: commands.Context) -> None: """Responds with a random tradition or custom.""" @@ -25,6 +24,6 @@ class Traditions(commands.Cog): await ctx.send(f"{random_country}:\n{traditions[random_country]}") -def setup(bot: commands.Bot) -> None: - """Traditions Cog load.""" - bot.add_cog(Traditions(bot)) +def setup(bot: Bot) -> None: + """Load the Traditions Cog.""" + bot.add_cog(Traditions()) |