Skip to content

Commit 267c8da

Browse files
committed
learn/interactions: review feedback v1
Signed-off-by: Luca Zeuch <[email protected]>
1 parent 7916299 commit 267c8da

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

content/learn/advanced/custom-interactions/creating-interactive-elements.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ the second field is a text input with a default value, and the third field is a
133133
least 100 characters. The custom ID is set to `modals-my_first_modal`, which helps us identifying the modal when we use
134134
a modal submission trigger for a custom command.
135135

136+
![My first modal example](modal_example.png)
137+
136138
## Multiple Components
137139

138-
You learnt how to create messages with just one component attached to it, but the whole point of components is to have
140+
You learned how to create messages with just one component attached to it, but the whole point of components is to have
139141
*a lot* of them available. Let's start with adding some more buttons!
140142

141143
### More Buttons
@@ -199,7 +201,7 @@ created menu to the `"menu"` key of the complex message builder, and sending sai
199201

200202
### Ordering Components
201203

202-
Let's say we want to play Tic Tac Toe. If we just add nine buttons into the same slice in our complex message builder,
204+
Let's say we want to play Tic-Tac-Toe. If we just add nine buttons into the same slice in our complex message builder,
203205
they will just fill the first row with five buttons, and the second row with four buttons, which is definitely not what
204206
we are looking for. The solution is to tell YAGPDB precisely how the rows look like and then pass each row to the
205207
`"button"` or `"menu"` key.
@@ -215,7 +217,7 @@ we are looking for. The solution is to tell YAGPDB precisely how the rows look l
215217
{{ sendMessage nil $message }}
216218
```
217219

218-
![Tic Tac Toe](tictactoe.png)
220+
![Tic-Tac-Toe](tictactoe.png)
219221

220222
#### Action Rows
221223

@@ -250,10 +252,10 @@ formula like reactions do. Emojis in components follow the [partial emoji
250252
object](https://discord.com/developers/docs/resources/emoji#emoji-object) structure, however only the ID *or* the Name
251253
fields are required, depending on if you are using a custom emoji or not.
252254

253-
| Field | Description |
254-
| ----- | ---------------------------------------------------------------------------------------------------- |
255-
| ID | ID of the emoji, only necessary when using Custom Emoji. |
256-
| Name | Name of the emoji, use the unicode character here. Only necessary when using builtin unicode emojis. |
255+
| Field | Description |
256+
| ----- | ----------------------------------------------------------------------------------------------------- |
257+
| ID | ID of the emoji, only necessary when using Custom Emoji. |
258+
| Name | Name of the emoji, use the unicode character here. Only necessary when using built-in unicode emojis. |
257259

258260
```yag
259261
{{ $unicodeEmojiButton := cbutton "emoji" (sdict "name" "😀") }}

content/learn/advanced/custom-interactions/introduction.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ language before learning interactions.
1212
{{< /callout >}}
1313

1414
Interactions within Discord allow server members to use alternative, built-in features to trigger bots to take action
15-
other than messages or reactions. These features include builtin buttons, dropdown selection menus, or submitting a
15+
other than messages or reactions. These features include built-in buttons, dropdown selection menus, or submitting a
1616
modal (basically a pop-up form). Within custom commands it is possible to not only create and customize these new
1717
interactive features, but respond to them as well, opening up new possibilities for ephemeral message responses, modals,
1818
and more within custom commands.
@@ -47,13 +47,14 @@ On the following pages, we will use the listed terms with their respective defin
4747
the Discord API.
4848

4949
Interaction
50-
: A user engaging with YAGPDB through one of Discord's builtin features: Clicking a button, Making a
50+
: A user engaging with YAGPDB through one of Discord's built-in features: Clicking a button, Making a
5151
selection with a select menu, or Submitting a modal.
5252

5353
Response
54-
: YAGPDB is required to respond promptly after receiving an interaction by either sending a message or modal, or by
55-
updating the message on which the interaction was triggered. If it does not do this, the user triggering the interaction
56-
will see a "This application did not respond" error. The bot cannot respond to an interaction more than once.
54+
: YAGPDB is required to respond promptly -- that is, within three (3) seconds -- after receiving an interaction by
55+
either sending a message or modal, or by updating the message on which the interaction was triggered. If it does not do
56+
this, the user triggering the interaction will see a "This application did not respond" error. The bot cannot respond to
57+
an interaction more than once.
5758

5859
Followup
5960
: Since YAGPDB may only *respond* to an *interaction* once, it is subsequently required to send an interaction

content/learn/advanced/custom-interactions/parsing-an-interaction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ parse out arguments in your custom ID, and use them in your response.
3131
menu and defining the options, the `"value"` field for each option defines which values will show up in this slice if
3232
chosen. A modal's values are simply the values of each field in order.
3333

34-
3534
## Parsing Buttons
3635

3736
As buttons do not provide any `.Values` data, we have to rely on the custom ID to pass around any data that a button may

0 commit comments

Comments
 (0)