@@ -185,7 +185,7 @@ class Component:
185185
186186 __slots__ : Tuple [str , ...] = ("type" , "id" )
187187
188- __repr_info__ : ClassVar [Tuple [str , ...]]
188+ __repr_attributes__ : ClassVar [Tuple [str , ...]]
189189
190190 # subclasses are expected to overwrite this if they're only usable with `MessageFlags.is_components_v2`
191191 is_v2 : ClassVar [bool ] = False
@@ -194,7 +194,7 @@ class Component:
194194 id : int
195195
196196 def __repr__ (self ) -> str :
197- attrs = " " .join (f"{ key } ={ getattr (self , key )!r} " for key in self .__repr_info__ )
197+ attrs = " " .join (f"{ key } ={ getattr (self , key )!r} " for key in self .__repr_attributes__ )
198198 return f"<{ self .__class__ .__name__ } { attrs } >"
199199
200200 @classmethod
@@ -236,7 +236,7 @@ class ActionRow(Component, Generic[ActionRowChildComponentT]):
236236
237237 __slots__ : Tuple [str , ...] = ("children" ,)
238238
239- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
239+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
240240
241241 def __init__ (self , data : ActionRowPayload ) -> None :
242242 self .type : Literal [ComponentType .action_row ] = ComponentType .action_row
@@ -303,7 +303,7 @@ class Button(Component):
303303 "sku_id" ,
304304 )
305305
306- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
306+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
307307
308308 def __init__ (self , data : ButtonComponentPayload ) -> None :
309309 self .type : Literal [ComponentType .button ] = ComponentType .button
@@ -404,7 +404,9 @@ class BaseSelectMenu(Component):
404404 )
405405
406406 # FIXME: this isn't pretty; we should decouple __repr__ from slots
407- __repr_info__ : ClassVar [Tuple [str , ...]] = tuple (s for s in __slots__ if s != "default_values" )
407+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = tuple (
408+ s for s in __slots__ if s != "default_values"
409+ )
408410
409411 # n.b: ideally this would be `BaseSelectMenuPayload`,
410412 # but pyright made TypedDict keys invariant and doesn't
@@ -480,7 +482,10 @@ class StringSelectMenu(BaseSelectMenu):
480482
481483 __slots__ : Tuple [str , ...] = ("options" ,)
482484
483- __repr_info__ : ClassVar [Tuple [str , ...]] = BaseSelectMenu .__repr_info__ + __slots__
485+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = (
486+ * BaseSelectMenu .__repr_attributes__ ,
487+ * __slots__ ,
488+ )
484489 type : Literal [ComponentType .string_select ]
485490
486491 def __init__ (self , data : StringSelectMenuPayload ) -> None :
@@ -677,7 +682,10 @@ class ChannelSelectMenu(BaseSelectMenu):
677682
678683 __slots__ : Tuple [str , ...] = ("channel_types" ,)
679684
680- __repr_info__ : ClassVar [Tuple [str , ...]] = BaseSelectMenu .__repr_info__ + __slots__
685+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = (
686+ * BaseSelectMenu .__repr_attributes__ ,
687+ * __slots__ ,
688+ )
681689 type : Literal [ComponentType .channel_select ]
682690
683691 def __init__ (self , data : ChannelSelectMenuPayload ) -> None :
@@ -884,7 +892,7 @@ class TextInput(Component):
884892 "min_length" ,
885893 )
886894
887- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
895+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
888896
889897 def __init__ (self , data : TextInputPayload ) -> None :
890898 self .type : Literal [ComponentType .text_input ] = ComponentType .text_input
@@ -953,7 +961,7 @@ class Section(Component):
953961
954962 __slots__ : Tuple [str , ...] = ("children" , "accessory" )
955963
956- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
964+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
957965
958966 is_v2 = True
959967
@@ -1000,7 +1008,7 @@ class TextDisplay(Component):
10001008
10011009 __slots__ : Tuple [str , ...] = ("content" ,)
10021010
1003- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
1011+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
10041012
10051013 is_v2 = True
10061014
@@ -1112,7 +1120,7 @@ class Thumbnail(Component):
11121120 "spoiler" ,
11131121 )
11141122
1115- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
1123+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
11161124
11171125 is_v2 = True
11181126
@@ -1163,7 +1171,7 @@ class MediaGallery(Component):
11631171
11641172 __slots__ : Tuple [str , ...] = ("items" ,)
11651173
1166- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
1174+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
11671175
11681176 is_v2 = True
11691177
@@ -1271,7 +1279,7 @@ class FileComponent(Component):
12711279
12721280 __slots__ : Tuple [str , ...] = ("file" , "spoiler" , "name" , "size" )
12731281
1274- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
1282+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
12751283
12761284 is_v2 = True
12771285
@@ -1322,7 +1330,7 @@ class Separator(Component):
13221330
13231331 __slots__ : Tuple [str , ...] = ("divider" , "spacing" )
13241332
1325- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
1333+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
13261334
13271335 is_v2 = True
13281336
@@ -1375,7 +1383,7 @@ class Container(Component):
13751383 "spoiler" ,
13761384 )
13771385
1378- __repr_info__ : ClassVar [Tuple [str , ...]] = __slots__
1386+ __repr_attributes__ : ClassVar [Tuple [str , ...]] = __slots__
13791387
13801388 is_v2 = True
13811389
0 commit comments