From 4bb07a32e098a704371520e3b7b1c8091500f5c3 Mon Sep 17 00:00:00 2001 From: Suraj B M Date: Tue, 22 Sep 2026 10:25:24 +0530 Subject: [PATCH] feat: add birthday greeting --- index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 92278e1..5bd19cb 100644 --- a/index.ts +++ b/index.ts @@ -8,6 +8,8 @@ const NTFY_URL = process.env.NTFY_URL const TOPIC = process.env.NTFY_TOPIC const TOKEN = process.env.NTFY_TOKEN +const isBirthday = dayjs().format("MM-DD") === "09-23" + if (!TOKEN || !NTFY_URL || !TOPIC) { console.error("ntfy token, url or topic not set") process.exit(1) @@ -22,7 +24,7 @@ async function main() { getWeather() ]) - const message = `Good Morning, SilicoFlare! + const message = `${isBirthday ? "Happy Birthday" : "Good Morning"}, SilicoFlare! Today is **${dayjs().format("dddd, DD MMMM YYYY")}**. Hoy es **${dayjs().locale("es").format("dddd, D [de] MMMM [de] YYYY")}**. @@ -43,7 +45,8 @@ ${usage} Authorization: `Bearer ${TOKEN}`, Title: `Daily Digest for ${dayjs().format("YYYY-MM-DD")}`, Markdown: "yes", - Tags: "calendar" + // if date is september 23rd, change the tag to "tada" + Tags: isBirthday ? "tada" : "calendar" }, body: message, },