You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/ext-dev/cookbook.md
+51Lines changed: 51 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,57 @@ Commands.registerCommand({
133
133
});
134
134
```
135
135
136
+
### Adding options to a slash command
137
+
138
+
Specify the option in the `options` array, then use a [type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) to get the value with the correct type:
Note that this sends an actual message into chat - it is *not* clientside or [ephemeral](https://discord.com/developers/docs/resources/message#message-object-message-flags).
186
+
136
187
### Modifying message content before it is sent
137
188
138
189
The legacy command system can also be used to replace text in messages before they are sent.
0 commit comments