[docs]classTextDisplay(Item[V]):"""Represents a UI text display. A message can have up to 4000 characters across all :class:`TextDisplay` objects combined. .. versionadded:: 2.7 Parameters ---------- content: :class:`str` The text display's content, up to 4000 characters. id: Optional[:class:`int`] The text display's ID. """__item_repr_attributes__:tuple[str,...]=("content","id",)def__init__(self,content:str,id:int|None=None,):super().__init__()self._underlying=TextDisplayComponent._raw_construct(type=ComponentType.text_display,id=id,content=content,)@propertydeftype(self)->ComponentType:returnself._underlying.type@propertydefcontent(self)->str:"""The text display's content."""returnself._underlying.content@content.setterdefcontent(self,value:str)->None:self._underlying.content=value@propertydefwidth(self)->int:return5defto_component_dict(self)->TextDisplayComponentPayload:returnself._underlying.to_dict()
[docs]defcopy_text(self)->str:"""Returns the content of this text display. Equivalent to the `Copy Text` option on Discord clients."""returnself.content