From 7370303b7a7123c0b154e121619b000052c0c0e1 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sat, 24 Dec 2022 20:40:47 -0700 Subject: [PATCH] docs: explain how to use server-side embeds --- .github/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 5acbfcc..ead4e41 100644 --- a/.github/README.md +++ b/.github/README.md @@ -247,7 +247,7 @@ If you primarily share media on Discord, you can add these additional (optional) | Header | Purpose | | ------ | ------- | -| **`X-Ass-OG-Title`** | Large text shown above your media | +| **`X-Ass-OG-Title`** | Large text shown above your media. Required for embeds to appear on desktop. | | **`X-Ass-OG-Description`** | Small text shown below the title but above the media (does not show up on videos) | | **`X-Ass-OG-Author`** | Small text shown above the title | | **`X-Ass-OG-Author-Url`** | URL to open when the Author is clicked | @@ -265,6 +265,20 @@ You can insert certain metadata into your embeds with these placeholders: | **`&filename`** | The original filename of the uploaded file | | **`×tamp`** | The timestamp of when the file was uploaded (example: `Oct 14, 1983, 1:30 PM`) | +#### Server-side embed configuration + +You may also specify a default embed config on the server. Keep in mind that if users specify the `X-Ass-OG-Title` header, the server-side config will be ignored. To configure the server-side embed, create a new file in the `share/` directory named `embed.json`. Available options are: + +- **`title`** +- `description` +- `author` +- `authorUrl` +- `provider` +- `providerUrl` +- `color` + +Their values are equivalent to the headers listed above. + ### Webhooks You may use Discord webhooks as an easy way to keep track of your uploads. The first step is to [create a new Webhook]. You only need to follow the first section, **Making a Webhook**. Once you are done that, click **Copy Webhook URL**. Finally, add these headers to your custom uploader: