diff --git a/roletiers/__init__.py b/roletiers/__init__.py index e94a9c3..060881e 100644 --- a/roletiers/__init__.py +++ b/roletiers/__init__.py @@ -9,4 +9,4 @@ async def setup(bot): cog = RoleTiers(bot) await cog.initialize() - bot.add_cog(cog) + await bot.add_cog(cog) diff --git a/roletiers/roletiers.py b/roletiers/roletiers.py index a0854ee..984e3cf 100644 --- a/roletiers/roletiers.py +++ b/roletiers/roletiers.py @@ -22,7 +22,7 @@ SOFTWARE. """ -from datetime import datetime, timedelta +from datetime import datetime, timezone, timedelta import discord from discord.ext import tasks @@ -87,7 +87,7 @@ def cog_unload(self): @staticmethod async def _seconds_since(time: datetime): - return (datetime.utcnow() - time).total_seconds() + return (datetime.now(timezone.utc) - time).total_seconds() @commands.Cog.listener("on_message_without_command") async def _message_listener(self, message: discord.Message):