@@ -97,7 +97,7 @@ class Select(Generic[V, ST], Item[V]):
97
97
98
98
.. versionchanged:: 2.7
99
99
100
- Can now be sent in :class:`discord.ui.Modal `.
100
+ Can now be sent in :class:`discord.ui.DesignerModal `.
101
101
102
102
Parameters
103
103
----------
@@ -137,16 +137,6 @@ class Select(Generic[V, ST], Item[V]):
137
137
ordering. The row number must be between 0 and 4 (i.e. zero indexed).
138
138
id: Optional[:class:`int`]
139
139
The select menu's ID.
140
- label: Optional[:class:`str`]
141
- The label for the select menu. Only useable in modals.
142
- Must be 45 characters or fewer.
143
-
144
- .. versionadded:: 2.7
145
- description: Optional[:class:`str`]
146
- The description for the select menu. Only useable in modals.
147
- Must be 100 characters or fewer.
148
-
149
- .. versionadded:: 2.7
150
140
required: Optional[:class:`bool`]
151
141
Whether the select is required or not. Only useable in modals. Defaults to ``True`` in modals.
152
142
@@ -194,8 +184,6 @@ class Select(Generic[V, ST], Item[V]):
194
184
"disabled" ,
195
185
"custom_id" ,
196
186
"id" ,
197
- "label" ,
198
- "description" ,
199
187
"required" ,
200
188
"default_values" ,
201
189
)
@@ -213,8 +201,6 @@ def __init__(
213
201
disabled : bool = ...,
214
202
row : int | None = ...,
215
203
id : int | None = ...,
216
- label : str | None = ...,
217
- description : str | None = ...,
218
204
required : bool | None = ...,
219
205
) -> None : ...
220
206
@@ -231,8 +217,6 @@ def __init__(
231
217
disabled : bool = ...,
232
218
row : int | None = ...,
233
219
id : int | None = ...,
234
- label : str | None = ...,
235
- description : str | None = ...,
236
220
required : bool | None = ...,
237
221
default_values : Sequence [SelectDefaultValue | ST ] | None = ...,
238
222
) -> None : ...
@@ -253,8 +237,6 @@ def __init__(
253
237
disabled : bool = ...,
254
238
row : int | None = ...,
255
239
id : int | None = ...,
256
- label : str | None = ...,
257
- description : str | None = ...,
258
240
required : bool | None = ...,
259
241
default_values : Sequence [SelectDefaultValue | ST ] | None = ...,
260
242
) -> None : ...
@@ -272,17 +254,11 @@ def __init__(
272
254
disabled : bool = False ,
273
255
row : int | None = None ,
274
256
id : int | None = None ,
275
- label : str | None = None ,
276
- description : str | None = None ,
277
257
required : bool | None = None ,
278
258
default_values : Sequence [SelectDefaultValue | ST ] | None = None ,
279
259
) -> None :
280
260
if options and select_type is not ComponentType .string_select :
281
261
raise InvalidArgument ("options parameter is only valid for string selects" )
282
- if label and len (label ) > 45 :
283
- raise ValueError ("label must be 45 characters or fewer" )
284
- if description and len (description ) > 100 :
285
- raise ValueError ("description must be 100 characters or fewer" )
286
262
if channel_types and select_type is not ComponentType .channel_select :
287
263
raise InvalidArgument (
288
264
"channel_types parameter is only valid for channel selects"
@@ -303,9 +279,6 @@ def __init__(
303
279
f"expected custom_id to be str, not { custom_id .__class__ .__name__ } "
304
280
)
305
281
306
- self .label : str | None = label
307
- self .description : str | None = description
308
-
309
282
self ._provided_custom_id = custom_id is not None
310
283
custom_id = os .urandom (16 ).hex () if custom_id is None else custom_id
311
284
self ._underlying : SelectMenu = SelectMenu ._raw_construct (
@@ -782,9 +755,6 @@ def is_dispatchable(self) -> bool:
782
755
def is_storable (self ) -> bool :
783
756
return True
784
757
785
- def uses_label (self ) -> bool :
786
- return bool (self .label or self .description or (self .required is not None ))
787
-
788
758
789
759
if TYPE_CHECKING :
790
760
StringSelect = Select [V , str ]
0 commit comments