Skip to content

Commit 31775e4

Browse files
committed
changed events ping
1 parent d307813 commit 31775e4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const {
1717
DATABASE_URL,
1818
DATABASE_AUTH_TOKEN,
1919
ANIMAL_WEBHOOK_URL,
20+
CALENDAR_ROLE_ID,
2021
} = process.env;
2122

2223
// Check if the environment variables are set
@@ -32,7 +33,8 @@ if (
3233
!CALENDAR_WEBHOOK_URL ||
3334
!DATABASE_URL ||
3435
!DATABASE_AUTH_TOKEN ||
35-
!ANIMAL_WEBHOOK_URL
36+
!ANIMAL_WEBHOOK_URL ||
37+
!CALENDAR_ROLE_ID
3638
) {
3739
throw new Error("Missing environment variables");
3840
}
@@ -51,4 +53,5 @@ export const config = {
5153
DATABASE_URL,
5254
DATABASE_AUTH_TOKEN,
5355
ANIMAL_WEBHOOK_URL,
56+
CALENDAR_ROLE_ID
5457
};

src/hooks/calendar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ async function hookLogic(client: Client, webhook: WebhookClient) {
323323
const messageDay = new Date(today);
324324
messageDay.setDate(today.getDate() + 1);
325325
webhook.send(
326-
`Hey @everyone, it's ${dateToString(messageDay)}, here are some reminders about our upcoming events!\n`
326+
`Hey <@&${config.CALENDAR_ROLE_ID}>, it's ${dateToString(messageDay)}, here are some reminders about our upcoming events!\n`
327327
);
328328
}
329329

0 commit comments

Comments
 (0)