From ae5cdd5bed0c046d9331904569df3045e257c447 Mon Sep 17 00:00:00 2001 From: un1xx <31860157+un1xx@users.noreply.github.com> Date: Sun, 11 May 2025 22:37:12 +0530 Subject: [PATCH] Update misc.py --- exts/misc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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):