diff --git a/main.ts b/main.ts index f37004a..e9f4832 100644 --- a/main.ts +++ b/main.ts @@ -135,9 +135,11 @@ export function makeHandler(kv: Deno.Kv) { if (ttlDuration) { // Render to Discord timestamp format. // https://gist.github.com/LeviSnoot/d9147767abeef2f770e9ddcd91eb85aa - const discordTimestamp = ``; + const discordTimestamp = toDiscordTimestamp( + (Date.now() + ttlDuration.raw) * 0.001, + ); content += - `\n\nThis shortlink will be expire in ${discordTimestamp}.`; + `\n\nThis shortlink will be expire ${discordTimestamp}.`; } // Send the success message. @@ -229,3 +231,7 @@ export function makeShorterOptions( }, }; } + +function toDiscordTimestamp(timestamp: number) { + return ``; +}