Add message links, suspect retries, and Discord preview recovery

This commit is contained in:
Fisto
2026-09-18 11:47:08 +02:00
parent 9481286169
commit 8752b36209
16 changed files with 831 additions and 35 deletions
+14
View File
@@ -0,0 +1,14 @@
/*
* Permanent Discord links. CDN URLs expire; the message link never does.
*/
/** `discord.com/channels/<guildId|@me>/<channelId>/<messageId>`, or null without a message. */
export function messageUrlFor(
guildId: string | null,
channelId: string,
messageId: string | null
): string | null {
if (!messageId) return null;
const scope = guildId ?? "@me";
return `https://discord.com/channels/${scope}/${channelId}/${messageId}`;
}