feat: add birthday greeting

This commit is contained in:
2026-09-22 10:25:24 +05:30
parent 09947b85cd
commit 4bb07a32e0
+5 -2
View File
@@ -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,
},