@@ -35,6 +35,7 @@ def slash_str_option(
3535 choices : List [Union ["SlashCommandChoice" , dict ]] | None = None ,
3636 min_length : Optional [int ] = None ,
3737 max_length : Optional [int ] = None ,
38+ name : Optional [str ] = None ,
3839) -> Type [str ]:
3940 """
4041 Annotates an argument as a string type slash command option.
@@ -46,10 +47,11 @@ def slash_str_option(
4647 choices: The choices allowed by this command
4748 min_length: The minimum length of text a user can input.
4849 max_length: The maximum length of text a user can input.
50+ name: The name of the option. Defaults to the name of the argument
4951
5052 """
5153 return SlashCommandOption (
52- name = "placeholder" ,
54+ name = name ,
5355 description = description ,
5456 required = required ,
5557 autocomplete = autocomplete ,
@@ -67,6 +69,7 @@ def slash_float_option(
6769 choices : List [Union ["SlashCommandChoice" , dict ]] | None = None ,
6870 min_value : Optional [float ] = None ,
6971 max_value : Optional [float ] = None ,
72+ name : Optional [str ] = None ,
7073) -> Type [float ]:
7174 """
7275 Annotates an argument as a float type slash command option.
@@ -78,10 +81,11 @@ def slash_float_option(
7881 choices: The choices allowed by this command
7982 min_value: The minimum number allowed
8083 max_value: The maximum number allowed
84+ name: The name of the option. Defaults to the name of the argument
8185
8286 """
8387 return SlashCommandOption (
84- name = "placeholder" ,
88+ name = name ,
8589 description = description ,
8690 required = required ,
8791 autocomplete = autocomplete ,
@@ -99,6 +103,7 @@ def slash_int_option(
99103 choices : List [Union ["SlashCommandChoice" , dict ]] | None = None ,
100104 min_value : Optional [float ] = None ,
101105 max_value : Optional [float ] = None ,
106+ name : Optional [str ] = None ,
102107) -> Type [int ]:
103108 """
104109 Annotates an argument as a integer type slash command option.
@@ -110,10 +115,11 @@ def slash_int_option(
110115 choices: The choices allowed by this command
111116 min_value: The minimum number allowed
112117 max_value: The maximum number allowed
118+ name: The name of the option. Defaults to the name of the argument
113119
114120 """
115121 return SlashCommandOption (
116- name = "placeholder" ,
122+ name = name ,
117123 description = description ,
118124 required = required ,
119125 autocomplete = autocomplete ,
@@ -127,17 +133,19 @@ def slash_int_option(
127133def slash_bool_option (
128134 description : str ,
129135 required : bool = False ,
136+ name : Optional [str ] = None ,
130137) -> Type [bool ]:
131138 """
132139 Annotates an argument as a boolean type slash command option.
133140
134141 Args:
135142 description: The description of your option
136143 required: Is this option required?
144+ name: The name of the option. Defaults to the name of the argument
137145
138146 """
139147 return SlashCommandOption (
140- name = "placeholder" ,
148+ name = name ,
141149 description = description ,
142150 required = required ,
143151 type = models .OptionType .BOOLEAN ,
@@ -148,6 +156,7 @@ def slash_user_option(
148156 description : str ,
149157 required : bool = False ,
150158 autocomplete : bool = False ,
159+ name : Optional [str ] = None ,
151160) -> Type [Union ["User" , "Member" ]]:
152161 """
153162 Annotates an argument as a user type slash command option.
@@ -156,10 +165,11 @@ def slash_user_option(
156165 description: The description of your option
157166 required: Is this option required?
158167 autocomplete: Use autocomplete for this option
168+ name: The name of the option. Defaults to the name of the argument
159169
160170 """
161171 return SlashCommandOption (
162- name = "placeholder" ,
172+ name = name ,
163173 description = description ,
164174 required = required ,
165175 autocomplete = autocomplete ,
@@ -173,6 +183,7 @@ def slash_channel_option(
173183 autocomplete : bool = False ,
174184 choices : List [Union ["SlashCommandChoice" , dict ]] | None = None ,
175185 channel_types : Optional [list [Union ["ChannelType" , int ]]] = None ,
186+ name : Optional [str ] = None ,
176187) -> Type ["BaseChannel" ]:
177188 """
178189 Annotates an argument as a channel type slash command option.
@@ -183,10 +194,11 @@ def slash_channel_option(
183194 autocomplete: Use autocomplete for this option
184195 choices: The choices allowed by this command
185196 channel_types: The types of channel allowed by this option
197+ name: The name of the option. Defaults to the name of the argument
186198
187199 """
188200 return SlashCommandOption (
189- name = "placeholder" ,
201+ name = name ,
190202 description = description ,
191203 required = required ,
192204 autocomplete = autocomplete ,
@@ -201,6 +213,7 @@ def slash_role_option(
201213 required : bool = False ,
202214 autocomplete : bool = False ,
203215 choices : List [Union ["SlashCommandChoice" , dict ]] | None = None ,
216+ name : Optional [str ] = None ,
204217) -> Type ["Role" ]:
205218 """
206219 Annotates an argument as a role type slash command option.
@@ -210,10 +223,11 @@ def slash_role_option(
210223 required: Is this option required?
211224 autocomplete: Use autocomplete for this option
212225 choices: The choices allowed by this command
226+ name: The name of the option. Defaults to the name of the argument
213227
214228 """
215229 return SlashCommandOption (
216- name = "placeholder" ,
230+ name = name ,
217231 description = description ,
218232 required = required ,
219233 autocomplete = autocomplete ,
@@ -227,6 +241,7 @@ def slash_mentionable_option(
227241 required : bool = False ,
228242 autocomplete : bool = False ,
229243 choices : List [Union ["SlashCommandChoice" , dict ]] | None = None ,
244+ name : Optional [str ] = None ,
230245) -> Type [Union ["Role" , "BaseChannel" , "User" , "Member" ]]:
231246 """
232247 Annotates an argument as a mentionable type slash command option.
@@ -236,10 +251,11 @@ def slash_mentionable_option(
236251 required: Is this option required?
237252 autocomplete: Use autocomplete for this option
238253 choices: The choices allowed by this command
254+ name: The name of the option. Defaults to the name of the argument
239255
240256 """
241257 return SlashCommandOption (
242- name = "placeholder" ,
258+ name = name ,
243259 description = description ,
244260 required = required ,
245261 autocomplete = autocomplete ,
@@ -251,17 +267,19 @@ def slash_mentionable_option(
251267def slash_attachment_option (
252268 description : str ,
253269 required : bool = False ,
270+ name : Optional [str ] = None ,
254271) -> Type ["Attachment" ]:
255272 """
256273 Annotates an argument as an attachment type slash command option.
257274
258275 Args:
259276 description: The description of your option
260277 required: Is this option required?
278+ name: The name of the option. Defaults to the name of the argument
261279
262280 """
263281 return SlashCommandOption (
264- name = "placeholder" ,
282+ name = name ,
265283 description = description ,
266284 required = required ,
267285 type = models .OptionType .ATTACHMENT ,
0 commit comments