Closed MrMysterius closed 2 years ago
Side note .replace(/{file.id}/gi, args[1].id.toString())
the .
in the regex is not escaped (\.
), so it counts as any character and not explicitly the dot so:
{file.id}
{fileFid}
{file#id}
{fileTid}
are all valid placeholders.
Could you send your variables for the discord notifs, so I can test them with your config.
This should be mine:
DISCORD_UPLOAD_EMBED_TITLE: ":page_facing_up: FILE/IMAGE/TEXT Upload from {user.name}"
DISCORD_UPLOAD_EMBED_DESCRIPTION: "**URL/LINK:** `{link}`\n**ID:** `{file.id}`\n**TYPE:** `{file.mime}`\n**NAME:** `{file.file}`"
DISCORD_UPLOAD_EMBED_COLOR: 0xffe051
DISCORD_UPLOAD_EMBED_IMAGE: true
DISCORD_UPLOAD_EMBED_THUMBNAIL: false
DISCORD_UPLOAD_EMBED_TIMESTAMP: true
DISCORD_SHORTEN_EMBED_TITLE: ":link: URL Shortened by {user.name}"
DISCORD_SHORTEN_EMBED_DESCRIPTION: "**URL/LINK:** `{link}`\n**ID:** `{url.id}`\n**VANITY:** `{url.vanity}`\n**DESTINATION:** `{url.destination}`"
DISCORD_SHORTEN_EMBED_COLOR: 0x5170ff
DISCORD_SHORTEN_EMBED_IMAGE: false
DISCORD_SHORTEN_EMBED_THUMBNAIL: false
DISCORD_SHORTEN_EMBED_TIMESTAMP: true
From the Link Shorten the placeholder work. On the File Uploads they don't.
Weird.. Unable to reproduce this. I'll push a fix that fixes the .
thing in the regex and you can change to the trunk
tag in docker once it updates.
I don't know what exactly change or if the fix/change fixed it 78a6f3122d3218689d7f6dfa702915e8b4f11985, but it seems to replace it now.
https://github.com/diced/zipline/blob/4589c6ee0aacd982478d7e4e107d4aa47fa0873f/src/lib/discord.ts#L18-L24
This bit is getting skipped for some reason, only on Files, URLs work.