Skip to content

Commit 89843be

Browse files
committed
reference/templates: document suppress_embeds key
Signed-off-by: Luca Zeuch <[email protected]>
1 parent 6316ca2 commit 89843be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

content/docs/reference/templates/functions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ Note that a message sent via [sendMessage](#sendmessage) is not the response---u
11821182
#### complexMessageEdit
11831183

11841184
```yag
1185-
{{ $message := complexMessageEdit [allowed_mentions] [content] [embed] [silent] }}
1185+
{{ $message := complexMessageEdit [allowed_mentions] [content] [embed] [silent] [suppress_embeds] }}
11861186
```
11871187

11881188
Creates a complex message object for use in [editMessage](#editmessage) or [editMessageNoEscape](#editmessagenoescape).
@@ -1195,14 +1195,17 @@ Creates a complex message object for use in [editMessage](#editmessage) or [edit
11951195
- `content`: the new content for the message.
11961196
- `embed`: an embed object or a slice of up to 10 embed objects.
11971197
- `silent`: whether to suppress push and desktop notifications.
1198+
- `suppress_embeds`: whether to suppress embeds in the message.
11981199

11991200
All of these keys are optional, but providing none of them will have no effect. See [complexMessage](#complexmessage)
12001201
for an example.
12011202

1203+
Setting `suppress_embeds` to `false` on a message with already suppressed embeds will not re-enable them.
1204+
12021205
#### complexMessage
12031206

12041207
```yag
1205-
{{ $message := complexMessage [allowed_mentions] [content] [embed] [file] [filename] [reply] [silent] [menus] [buttons] [sticker] [forward] }}
1208+
{{ $message := complexMessage [allowed_mentions] [content] [embed] [file] [filename] [reply] [silent] [menus] [buttons] [sticker] [forward] [suppress_embeds] }}
12061209
```
12071210

12081211
Creates a complex message object for use in [sendMessage](#sendmessage) functions.
@@ -1222,6 +1225,7 @@ Creates a complex message object for use in [sendMessage](#sendmessage) function
12221225
- `buttons`: a slice of [button objects](#cbutton).
12231226
- `sticker`: single sticker ID or a slice of sticker IDs
12241227
- `forward`: an sdict containing `channel` and `message` keys specifying the message to forward
1228+
- `suppress_embeds`: whether to suppress embeds in the message.
12251229

12261230
All of these keys are optional, but providing an empty content, file, or no embeds will result in no message being sent.
12271231

0 commit comments

Comments
 (0)