Update misc.py

This commit is contained in:
un1xx authored and GitHub committed 2025-05-11 22:37:12 +05:30
1 parent f011ae73c5
commit ae5cdd5bed
1 file changed
+5 -5
+5 -5
View File
@@ -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):