@@ -82,10 +82,6 @@ class Button(Item[V]):
82
82
83
83
id: Optional[:class:`int`]
84
84
The button's ID.
85
- priority: Optional[:class:`int`]
86
- Only works in :class:`ActionRow`. Any integer greater than 0. If specified, decides the position
87
- of the button in this row instead of going by order of addition. The lower this number, the earlier its position.
88
- The ActionRow's children will be reordered when the View containing this button is sent.
89
85
"""
90
86
91
87
__item_repr_attributes__ : tuple [str , ...] = (
@@ -98,7 +94,6 @@ class Button(Item[V]):
98
94
"row" ,
99
95
"custom_id" ,
100
96
"id" ,
101
- "priority" ,
102
97
)
103
98
104
99
def __init__ (
@@ -113,7 +108,6 @@ def __init__(
113
108
sku_id : int | None = None ,
114
109
row : int | None = None ,
115
110
id : int | None = None ,
116
- priority : int | None = None ,
117
111
):
118
112
super ().__init__ ()
119
113
if label and len (str (label )) > 80 :
@@ -126,14 +120,11 @@ def __init__(
126
120
raise TypeError ("cannot mix both url and sku_id with Button" )
127
121
if custom_id is not None and sku_id is not None :
128
122
raise TypeError ("cannot mix both sku_id and custom_id with Button" )
129
- if priority and (priority < 0 or not isinstance (priority , int )):
130
- raise ValueError ("priority must be an integer greater than 0" )
131
123
132
124
if not isinstance (custom_id , str ) and custom_id is not None :
133
125
raise TypeError (
134
126
f"expected custom_id to be str, not { custom_id .__class__ .__name__ } "
135
127
)
136
- self .priority : int | None = priority
137
128
138
129
self ._provided_custom_id = custom_id is not None
139
130
if url is None and custom_id is None and sku_id is None :
@@ -303,7 +294,6 @@ def button(
303
294
emoji : str | GuildEmoji | AppEmoji | PartialEmoji | None = None ,
304
295
row : int | None = None ,
305
296
id : int | None = None ,
306
- priority : int | None = None ,
307
297
) -> Callable [[ItemCallbackType [Button [V ]]], Button [V ]]:
308
298
"""A decorator that attaches a button to a component.
309
299
@@ -342,11 +332,6 @@ def button(
342
332
.. warning::
343
333
344
334
This parameter does not work in :class:`ActionRow`.
345
-
346
- priority: Optional[:class:`int`]
347
- Only works in :class:`ActionRow`. Any integer greater than 0. If specified, decides the position
348
- of the button in this row instead of going by order of addition. The lower this number, the earlier its position.
349
- The ActionRow's children will be reordered when the View containing it is sent. A priority of ``None`` will be ordered after any specified priority.
350
335
"""
351
336
352
337
def decorator (func : ItemCallbackType ) -> ItemCallbackType :
@@ -363,7 +348,6 @@ def decorator(func: ItemCallbackType) -> ItemCallbackType:
363
348
"emoji" : emoji ,
364
349
"row" : row ,
365
350
"id" : id ,
366
- "priority" : priority ,
367
351
}
368
352
return func
369
353
0 commit comments