[docs]classThumbnail(Item[V]):"""Represents a UI Thumbnail. .. versionadded:: 2.7 Parameters ---------- url: :class:`str` The url of the thumbnail. This can either be an arbitrary URL or an ``attachment://`` URL to work with local files. description: Optional[:class:`str`] The thumbnail's description, up to 1024 characters. spoiler: Optional[:class:`bool`] Whether the thumbnail has the spoiler overlay. Defaults to ``False``. id: Optional[:class:`int`] The thumbnail's ID. """__item_repr_attributes__:tuple[str,...]=("url","description","spoiler","id",)def__init__(self,url:str,*,description:str=None,spoiler:bool=False,id:int=None,):super().__init__()media=UnfurledMediaItem(url)self._underlying=ThumbnailComponent._raw_construct(type=ComponentType.thumbnail,id=id,media=media,description=description,spoiler=spoiler,)@propertydeftype(self)->ComponentType:returnself._underlying.type@propertydefwidth(self)->int:return5@propertydefurl(self)->str:"""The URL of this thumbnail's media. This can either be an arbitrary URL or an ``attachment://`` URL."""returnself._underlying.mediaandself._underlying.media.url@url.setterdefurl(self,value:str)->None:self._underlying.media.url=value@propertydefdescription(self)->str|None:"""The thumbnail's description, up to 1024 characters."""returnself._underlying.description@description.setterdefdescription(self,description:str|None)->None:self._underlying.description=description@propertydefspoiler(self)->bool:"""Whether the thumbnail has the spoiler overlay. Defaults to ``False``."""returnself._underlying.spoiler@spoiler.setterdefspoiler(self,spoiler:bool)->None:self._underlying.spoiler=spoilerdefto_component_dict(self)->ThumbnailComponentPayload:returnself._underlying.to_dict()@classmethoddeffrom_component(cls:type[T],component:ThumbnailComponent)->T:returncls(component.mediaandcomponent.media.url,description=component.description,spoiler=component.spoiler,id=component.id,)callback=None