Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roletiers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
async def setup(bot):
cog = RoleTiers(bot)
await cog.initialize()
bot.add_cog(cog)
await bot.add_cog(cog)
4 changes: 2 additions & 2 deletions roletiers/roletiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
SOFTWARE.
"""

from datetime import datetime, timedelta
from datetime import datetime, timezone, timedelta

import discord
from discord.ext import tasks
Expand Down Expand Up @@ -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):
Expand Down