|
3 | 3 | from enum import IntEnum
|
4 | 4 | from typing import TYPE_CHECKING, List, Optional, Union
|
5 | 5 |
|
| 6 | +from ...client.models.component import ActionRow, Button, SelectMenu |
6 | 7 | from ..error import LibraryException
|
7 | 8 | from .attrs_utils import (
|
8 | 9 | MISSING,
|
|
22 | 23 | from .user import User
|
23 | 24 |
|
24 | 25 | if TYPE_CHECKING:
|
25 |
| - from ...client.models.component import ActionRow, Button, Component, SelectMenu |
26 | 26 | from ..http import HTTPClient
|
27 | 27 |
|
28 | 28 | __all__ = (
|
@@ -731,7 +731,7 @@ class Message(ClientSerializerMixin, IDMixin):
|
731 | 731 | :ivar int flags: Message flags
|
732 | 732 | :ivar Optional[MessageInteraction] interaction?: Message interaction object, if the message is sent by an interaction.
|
733 | 733 | :ivar Optional[Channel] thread?: The thread that started from this message, if any, with a thread member object embedded.
|
734 |
| - :ivar Optional[Union[Component, List[Component]]] components?: Components associated with this message, if any. |
| 734 | + :ivar Optional[List[ActionRow]] components?: Array of Action Rows associated with this message, if any. |
735 | 735 | :ivar Optional[List[PartialSticker]] sticker_items?: An array of message sticker item objects, if sent with them.
|
736 | 736 | :ivar Optional[List[Sticker]] stickers?: Array of sticker objects sent with the message if any. Deprecated.
|
737 | 737 | :ivar Optional[int] position?: The approximate position of the message in a thread.
|
@@ -775,7 +775,7 @@ class Message(ClientSerializerMixin, IDMixin):
|
775 | 775 | )
|
776 | 776 | thread: Optional[Channel] = field(converter=Channel, default=None, add_client=True)
|
777 | 777 |
|
778 |
| - components: Optional[Union["Component", List["Component"]]] = field(default=None) |
| 778 | + components: Optional[List["ActionRow"]] = field(converter=convert_list(ActionRow), default=None) |
779 | 779 | sticker_items: Optional[List[PartialSticker]] = field(
|
780 | 780 | converter=convert_list(PartialSticker), default=None
|
781 | 781 | )
|
|
0 commit comments