diff --git a/exts/misc.py b/exts/misc.py index 3ee4bfa..54efbd8 100644 --- a/exts/misc.py +++ b/exts/misc.py @@ -111,11 +111,11 @@ class Misc(commands.Cog): ) def seconds_until_target(self, hour: int, minute: int = 0): - now = datetime.datetime.utcnow() - target = now.replace(hour=hour, minute=minute, second=0, microsecond=0) - if target < now: - target += datetime.timedelta(days=1) - return (target - now).total_seconds() + now = datetime.datetime.utcnow() + target = now.replace(hour=hour, minute=minute, second=0, microsecond=0) + if target < now: + target += datetime.timedelta(days=1) + return (target - now).total_seconds() @tasks.loop(hours=24) async def send_daily_message(self):