3434__all__ = (
3535 "Embed" ,
3636 "EmbedField" ,
37+ "EmbedAuthor" ,
38+ "EmbedFooter" ,
3739)
3840
3941
@@ -62,7 +64,7 @@ def __repr__(self) -> str:
6264 inner = ", " .join (
6365 (f"{ k } ={ v !r} " for k , v in self .__dict__ .items () if not k .startswith ("_" ))
6466 )
65- return f"EmbedProxy ({ inner } )"
67+ return f"{ type ( self ). __name__ } ({ inner } )"
6668
6769 def __getattr__ (self , attr : str ) -> _EmptyEmbed :
6870 return EmptyEmbed
@@ -103,6 +105,64 @@ class _EmbedAuthorProxy(Protocol):
103105 proxy_icon_url : MaybeEmpty [str ]
104106
105107
108+ class EmbedAuthor (EmbedProxy ):
109+ """Represents the author on the :class:`Embed` object.
110+
111+ .. versionadded:: 2.5
112+
113+ Attributes
114+ ----------
115+ name: :class:`str`
116+ The name of the author.
117+ url: :class:`str`
118+ The URL of the hyperlink created in the author's name.
119+ icon_url: :class:`str`
120+ The URL of the author icon image.
121+ """
122+
123+ def __init__ (
124+ self ,
125+ name : str ,
126+ url : MaybeEmpty [str ] = EmptyEmbed ,
127+ icon_url : MaybeEmpty [str ] = EmptyEmbed ,
128+ proxy_icon_url : MaybeEmpty [str ] = EmptyEmbed ,
129+ ) -> None :
130+ layer = {
131+ k : v
132+ for k , v in locals ().items ()
133+ if k in {"name" , "url" , "icon_url" , "proxy_icon_url" }
134+ and v is not EmptyEmbed
135+ }
136+ super ().__init__ (layer )
137+
138+
139+ class EmbedFooter (EmbedProxy ):
140+ """Represents the footer on the :class:`Embed` object.
141+
142+ .. versionadded:: 2.5
143+
144+ Attributes
145+ ----------
146+ text: :class:`str`
147+ The text inside the footer.
148+ icon_url: :class:`str`
149+ The URL of the footer icon image.
150+ """
151+
152+ def __init__ (
153+ self ,
154+ text : str ,
155+ icon_url : MaybeEmpty [str ] = EmptyEmbed ,
156+ proxy_icon_url : MaybeEmpty [str ] = EmptyEmbed ,
157+ ) -> None :
158+ layer = {
159+ k : v
160+ for k , v in locals ().items ()
161+ if k in {"text" , "icon_url" , "proxy_icon_url" } and v is not EmptyEmbed
162+ }
163+ super ().__init__ (layer )
164+
165+
106166class EmbedField :
107167 """Represents a field on the :class:`Embed` object.
108168
@@ -246,6 +306,10 @@ def __init__(
246306 description : MaybeEmpty [Any ] = EmptyEmbed ,
247307 timestamp : datetime .datetime = None ,
248308 fields : list [EmbedField ] | None = None ,
309+ author : MaybeEmpty [EmbedAuthor ] = EmptyEmbed ,
310+ footer : MaybeEmpty [EmbedFooter ] = EmptyEmbed ,
311+ image : MaybeEmpty [str ] = EmptyEmbed ,
312+ thumbnail : MaybeEmpty [str ] = EmptyEmbed ,
249313 ):
250314 self .colour = colour if colour is not EmptyEmbed else color
251315 self .title = title
@@ -266,6 +330,18 @@ def __init__(
266330 self .timestamp = timestamp
267331 self ._fields : list [EmbedField ] = fields or []
268332
333+ if author is not EmptyEmbed :
334+ self .set_author (** author .__dict__ )
335+
336+ if footer is not EmptyEmbed :
337+ self .set_footer (** footer .__dict__ )
338+
339+ if image is not EmptyEmbed :
340+ self .set_image (url = image )
341+
342+ if thumbnail is not EmptyEmbed :
343+ self .set_thumbnail (url = thumbnail )
344+
269345 @classmethod
270346 def from_dict (cls : type [E ], data : Mapping [str , Any ]) -> E :
271347 """Converts a :class:`dict` to a :class:`Embed` provided it is in the
@@ -426,14 +502,14 @@ def timestamp(self, value: MaybeEmpty[datetime.datetime]):
426502 )
427503
428504 @property
429- def footer (self ) -> _EmbedFooterProxy :
505+ def footer (self ) -> EmbedFooter :
430506 """Returns an ``EmbedProxy`` denoting the footer contents.
431507
432508 See :meth:`set_footer` for possible values you can access.
433509
434510 If the attribute has no value then :attr:`Empty` is returned.
435511 """
436- return EmbedProxy ( getattr (self , "_footer" , {})) # type: ignore
512+ return EmbedFooter ( ** getattr (self , "_footer" , {}))
437513
438514 def set_footer (
439515 self : E ,
@@ -618,14 +694,14 @@ def provider(self) -> _EmbedProviderProxy:
618694 return EmbedProxy (getattr (self , "_provider" , {})) # type: ignore
619695
620696 @property
621- def author (self ) -> _EmbedAuthorProxy :
697+ def author (self ) -> EmbedAuthor :
622698 """Returns an ``EmbedProxy`` denoting the author contents.
623699
624700 See :meth:`set_author` for possible values you can access.
625701
626702 If the attribute has no value then :attr:`Empty` is returned.
627703 """
628- return EmbedProxy ( getattr (self , "_author" , {})) # type: ignore
704+ return EmbedAuthor ( ** getattr (self , "_author" , {})) # type: ignore
629705
630706 def set_author (
631707 self : E ,
0 commit comments