File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1611,7 +1611,7 @@ async def send(
1611
1611
if view :
1612
1612
if not hasattr (view , "__discord_ui_view__" ):
1613
1613
raise InvalidArgument (
1614
- f"view parameter must be View not { view .__class__ !r} "
1614
+ f"view parameter must be BaseView not { view .__class__ !r} "
1615
1615
)
1616
1616
1617
1617
components = view .to_components ()
Original file line number Diff line number Diff line change @@ -1328,7 +1328,7 @@ async def create_thread(
1328
1328
if view :
1329
1329
if not hasattr (view , "__discord_ui_view__" ):
1330
1330
raise InvalidArgument (
1331
- f"view parameter must be View not { view .__class__ !r} "
1331
+ f"view parameter must be BaseView not { view .__class__ !r} "
1332
1332
)
1333
1333
1334
1334
components = view .to_components ()
Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ def fits_legacy(self, item) -> bool:
203
203
class BaseView (ItemInterface ):
204
204
"""The base class for UI views used in messages."""
205
205
206
+ __discord_ui_view__ : ClassVar [bool ] = True
206
207
MAX_ITEMS : int
207
208
208
209
def __init__ (
@@ -546,8 +547,6 @@ class View(BaseView):
546
547
The parent interaction which this view was sent from.
547
548
If ``None`` then the view was not sent using :meth:`InteractionResponse.send_message`.
548
549
"""
549
-
550
- __discord_ui_view__ : ClassVar [bool ] = True
551
550
__view_children_items__ : ClassVar [list [ItemCallbackType ]] = []
552
551
MAX_ITEMS : int = 25
553
552
You can’t perform that action at this time.
0 commit comments