mirror of
https://github.com/alterware/aw-bot.git
synced 2025-11-18 09:02:07 +00:00
chore: handle this event
This commit is contained in:
@@ -166,16 +166,20 @@ async def setup(bot):
|
|||||||
async def heat_death():
|
async def heat_death():
|
||||||
try:
|
try:
|
||||||
now = aware_utcnow()
|
now = aware_utcnow()
|
||||||
|
|
||||||
remaining_seconds = int((TARGET_DATE - now).total_seconds())
|
remaining_seconds = int((TARGET_DATE - now).total_seconds())
|
||||||
|
|
||||||
print(f"Seconds until August 12, 2036, UTC: {remaining_seconds}")
|
print(f"Seconds until August 12, 2036, UTC: {remaining_seconds}")
|
||||||
|
|
||||||
channel = bot.get_channel(OFFTOPIC_CHANNEL)
|
channel = bot.get_channel(OFFTOPIC_CHANNEL)
|
||||||
if channel:
|
if channel:
|
||||||
|
if remaining_seconds > 0:
|
||||||
await channel.send(
|
await channel.send(
|
||||||
f"Can you believe it? Only {remaining_seconds} seconds until August 12th, 2036, the heat death of the universe."
|
f"Can you believe it? Only {remaining_seconds} seconds until August 12th, 2036, the heat death of the universe."
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
await channel.send(
|
||||||
|
"The heat death of the universe has come and gone. We exist in a post-time void. Nothing remains but this message."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
print("Debug: Channel not found. Check the OFFTOPIC_CHANNEL variable.")
|
print("Debug: Channel not found. Check the OFFTOPIC_CHANNEL variable.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user