updating the scripts

This commit is contained in:
2026-02-11 13:31:50 +00:00
parent 3a845bf532
commit 36211d28d8
18 changed files with 700 additions and 148 deletions

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
import requests
from datetime import datetime
NIKAH_DAY = datetime(2026, 8, 2)
WALIMAH_DAY = datetime(2026, 8, 9)
docstring = """
This script sends daily countdown reminders via a Discord webhook about
the number of days remaining until two significant events: Nikah Day and
Walimah Day. It calculates the days left for each event and formats a
message to be sent to a specified Discord channel.
"""
DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/1461100056580067684/BAxF4ndrugLJX8L6WyUtbzOtqoTR0GyxMWhg6jzkdCy1CC8yLfDb7e5erz_FoMUHmviw"
if __name__ == "__main__":
today = datetime.now()
days_to_nikah = (NIKAH_DAY - today).days
days_to_walimah = (WALIMAH_DAY - today).days
days_to_nikah += 1
days_to_walimah += 1
message = f"📅 Countdown Update:\n\n"
message += f"💍 Nikah Day: {days_to_nikah} days remaining!\n"
message += f"🎉 Walimah Day: {days_to_walimah} days remaining!\n"
payload = {
"content": message
}
r = requests.post(DISCORD_WEBHOOK_URL, json=payload, timeout=10)
r.raise_for_status()