aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/timeleft.py
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-05-15 23:41:20 +0200
committerGravatar GitHub <[email protected]>2021-05-15 23:41:20 +0200
commite6e280cd13236647ffcaa35f522baeb747fbf97e (patch)
treea888762bcd97704f57ad33e8e1bd0d179c3abd2b /bot/exts/halloween/timeleft.py
parentMerge pull request #737 from python-discord/latex-don't-load-cog (diff)
parentchore: Apply Iceman's suggestions (diff)
Spring cleanup (#718)
This PR changes a ton of various different bits and pieces. Please see #718 for more information.
Diffstat (limited to 'bot/exts/halloween/timeleft.py')
-rw-r--r--bot/exts/halloween/timeleft.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/bot/exts/halloween/timeleft.py b/bot/exts/halloween/timeleft.py
index 47adb09b..e80025dc 100644
--- a/bot/exts/halloween/timeleft.py
+++ b/bot/exts/halloween/timeleft.py
@@ -4,15 +4,14 @@ from typing import Tuple
from discord.ext import commands
+from bot.bot import Bot
+
log = logging.getLogger(__name__)
class TimeLeft(commands.Cog):
"""A Cog that tells you how long left until Hacktober is over!"""
- def __init__(self, bot: commands.Bot):
- self.bot = bot
-
def in_hacktober(self) -> bool:
"""Return True if the current time is within Hacktoberfest."""
_, end, start = self.load_date()
@@ -64,6 +63,6 @@ class TimeLeft(commands.Cog):
)
-def setup(bot: commands.Bot) -> None:
- """Cog load."""
- bot.add_cog(TimeLeft(bot))
+def setup(bot: Bot) -> None:
+ """Load the Time Left Cog."""
+ bot.add_cog(TimeLeft())