mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 02:46:53 +00:00
Update Discord Notify docs with URL attribute (#23335)
This commit is contained in:
parent
830da35342
commit
44cdecbdd6
@ -74,6 +74,8 @@ The following attributes can be placed inside the `data` key of the service call
|
||||
| Attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `images` | yes | The file(s) to attach to message.
|
||||
| `urls` | yes | The file(s) to download from a remote URL and attach to message.
|
||||
| `verify_ssl` | yes | A boolean to determine if SSL certs should be verified when calling the remote URLs in the `url` attribute. Defaults to `True`.
|
||||
| `embed` | yes | Array of [Discord embeds](https://discordpy.readthedocs.io/en/latest/api.html#embed). *NOTE*: if using `embed`, `message` is still required.
|
||||
|
||||
To include messages with embedding, use these attributes underneath the `embed` key:
|
||||
@ -103,6 +105,22 @@ To include messages with embedding, use these attributes underneath the `embed`
|
||||
- "/tmp/garage.jpg"
|
||||
```
|
||||
|
||||
### Example service call with attachments sourced from remote URLs
|
||||
|
||||
```yaml
|
||||
- service: notify.discord
|
||||
data:
|
||||
message: "A message from Home Assistant"
|
||||
target: ["1234567890", "0987654321"]
|
||||
data:
|
||||
verify_ssl: False
|
||||
urls:
|
||||
- "https://example.com/image.jpg"
|
||||
- "https://example.com/video.mp4"
|
||||
```
|
||||
|
||||
Note that `verify_ssl` defaults to `True`, and that any remote hosts will need to be in your [`allowlist_external_urls`](/docs/configuration/basic/#allowlist_external_urls) list. Discord limits attachment size to 8MB, so anything exceeding this will be skipped and noted in the error log.
|
||||
|
||||
### Example embed service call
|
||||
|
||||
```yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user