Skip to content

Conversation

@AllegraCodes
Copy link

@AllegraCodes AllegraCodes commented May 21, 2024

Discord webhooks accept embedded thumbnails sent as an attachment to a multipart form, allowing the image to be embedded when the server isn't accessible to the public. Instead of sending just a link to the thumbnail to the webhook, this PR retrieves the image and attaches it to the request sent to the webhook, ensuring it is available. Also update the Item Added template to demonstrate this use.

Fixes #243

@AllegraCodes AllegraCodes marked this pull request as draft November 10, 2025 10:25
@AllegraCodes AllegraCodes marked this pull request as ready for review November 10, 2025 21:37
@AllegraCodes
Copy link
Author

Tested in the following scenarios:

  • The embed object has a thumbnail referencing an attachment called thumbnail.jpg and the thumbnail exists
  • The embed object has a thumbnail referencing an attachment called thumbnail.jpg and the thumbnail does not exist
  • The embed object has a thumbnail not referencing an attachment called thumbnail.jpg
  • The embed object does not have a thumbnail

@AllegraCodes AllegraCodes changed the title Send thumbnail as attachment Send thumbnail as attachment for Discord Nov 10, 2025
@AllegraCodes
Copy link
Author

closing because making http requests from a plugin to the core is obviously not a clean way to do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images are only sent as links and don't show up on Discord

1 participant