Format code

This commit is contained in:
2022-08-02 14:57:43 +02:00
parent 4dbdd59d8d
commit da5ece0b1c
8 changed files with 325 additions and 322 deletions

View File

@ -1,17 +1,19 @@
# discord-embed
Discord will only create embeds for videos and images if they are smaller than 8MB. We can "abuse" this by using the [twitter:image HTML meta tag](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup).
Discord will only create embeds for videos and images if they are smaller than 8MB. We can "abuse" this by using
the [twitter:image HTML meta tag](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup).
This is useful when you send a video and want it to be playable in Discord.
## How it works
This program will create a .html that you will send instead of a .mp4 file. Discord will parse the HTML and create an embed for you. The embed will be the same as the one you would get if you send a .mp4 file.
This program will create a .html that you will send instead of a .mp4 file. Discord will parse the HTML and create an
embed for you. The embed will be the same as the one you would get if you send a .mp4 file.
## Environment variables
| Variable | Description |
| ------------- | ---------------------------------------------------------------- |
|---------------|------------------------------------------------------------------|
| SERVE_DOMAIN | Domain where we server files from, not where we upload files to. |
| UPLOAD_FOLDER | Path to the directory where we store files. |
| WEBHOOK_URL | Discord Webhook URL |