From 5a691d7917a9c87a23e770a5e0bd73360576df14 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Sat, 31 Dec 2022 21:57:37 +0530 Subject: [PATCH] Reject new present drops after hitting New Years timestamp --- main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index b9552239..b2bbe710 100644 --- a/main.py +++ b/main.py @@ -141,11 +141,12 @@ async def on_ready(): time.sleep(5) print("[main/Presents] Presents daemon started.") while True: - print(f"[main/Presents] Dropping new presents in {colors.cyan}#general{colors.end} channel...") - await asyncio.sleep(randint(450, 600)) - cyberspace_channel_context = await client.fetch_channel(880409977074888718) - localembed = discord.Embed(title="**:gift: Presents have dropped in chat!**", description="Be the first one to collect them!", color=color) - await cyberspace_channel_context.send(embed=localembed, view=PresentsDrop()) + if floor(time.time()) > 1672511400: + print(f"[main/Presents] Dropping new presents in {colors.cyan}#general{colors.end} channel...") + await asyncio.sleep(randint(450, 600)) + cyberspace_channel_context = await client.fetch_channel(880409977074888718) + localembed = discord.Embed(title="**:gift: Presents have dropped in chat!**", description="Be the first one to collect them!", color=color) + await cyberspace_channel_context.send(embed=localembed, view=PresentsDrop()) @client.event async def on_message(ctx):