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: docs/Interactions/slash-commands.mdx
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@ import {
11
11
} from"@discord-message-components/react";
12
12
import"@discord-message-components/react/styles";
13
13
14
+
importTabsfrom"@theme/Tabs";
15
+
importTabItemfrom"@theme/TabItem";
16
+
14
17
## About
15
18
16
19
On March 24, 2021, Discord added Slash Commands to Discord as an easier, more efficient, and better way of using bot commands. Pycord has implemented Slash Commands into the library so it's simple, efficient, and familiar.
@@ -169,6 +172,76 @@ The registered slash commands from the cog should be displayed as normal in the
169
172
</DiscordMessage>
170
173
</DiscordMessages>
171
174
175
+
## Options & Option Types
176
+
177
+
Whenever you're using Slash Commands, you might notice that you can specify parameters that the user has to set or can optionally set. These are called Options.
178
+
179
+
Since you want different inputs from Options, you'll have to specify the type for that Option. There are a few ways of doing this.
180
+
181
+
<Tabs>
182
+
<TabItemvalue="0"label="Use type annotations and let Pycord figure out its type"default>
0 commit comments