Skip to content

Commit d1a8115

Browse files
committed
reference: document cmodal function
Signed-off-by: Luca Zeuch <[email protected]>
1 parent 02c2f41 commit d1a8115

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

content/docs/reference/templates/functions.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ Sends a modal to the member who triggered the interaction.
553553
- `min_length`: the minimum length of the field.
554554
- `max_length`: the maximum length of the field.
555555

556+
Alternatively, you can create a modal object using the [`cmodal`](#cmodal) function.
557+
556558
#### Example
557559

558560
```yag
@@ -731,6 +733,16 @@ The type should be provided as a string: `"text"`, `"user"`, `"role"`, `"mention
731733
{{ sendMessage nil (complexMessage "menus" $menu) }}
732734
```
733735

736+
### cmodal
737+
738+
```yag
739+
{{ $modal := cmodal }}
740+
```
741+
742+
Creates a [modal object][modals] for use in interactions. See [`sendModal`](#sendmodal) for more detail.
743+
744+
[modals]: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
745+
734746
### ephemeralResponse
735747

736748
```yag

0 commit comments

Comments
 (0)