mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(dynamic timestamp): add dynamic discord timestamps
This commit is contained in:
@@ -26,6 +26,7 @@ export const sendDatabaseBackupNotifications = async ({
|
||||
errorMessage?: string;
|
||||
}) => {
|
||||
const date = new Date();
|
||||
const unixDate = ~~((Number(date)) / 1000);
|
||||
const notificationList = await db.query.notifications.findMany({
|
||||
where: and(
|
||||
eq(notifications.databaseBackup, true),
|
||||
@@ -85,12 +86,12 @@ export const sendDatabaseBackupNotifications = async ({
|
||||
},
|
||||
{
|
||||
name: "`📅`・Date",
|
||||
value: date.toLocaleDateString(),
|
||||
value: `<t:${unixDate}:D>`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: "`⌚`・Time",
|
||||
value: date.toLocaleTimeString(),
|
||||
value: `<t:${unixDate}:t>`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user