Embed (Legacy)¶
Note
The following classes come from the discord.parts.embed
module.
EmbedBuilder
dataclass
¶
Bases: DataModel
Represents the Embed portion of a message.
title: Optional[str] = None
class-attribute
instance-attribute
¶
This embed's title.
description: Optional[str] = None
class-attribute
instance-attribute
¶
This embed's description.
timestamp: Optional[str] = None
class-attribute
instance-attribute
¶
Timestamp of when the embed was sent.
color: Optional[int] = None
class-attribute
instance-attribute
¶
Embed's accent color.
author: Optional[_EmbedAuthor] = None
class-attribute
instance-attribute
¶
Embed's author.
thumbnail: Optional[_EmbedThumbnail] = None
class-attribute
instance-attribute
¶
Embed's thumbnail attachment.
image: Optional[_EmbedImage] = None
class-attribute
instance-attribute
¶
Embed's image attachment.
fields: Optional[list[_EmbedField]] = None
class-attribute
instance-attribute
¶
List of embed's fields.
footer: Optional[_EmbedFooter] = None
class-attribute
instance-attribute
¶
Embed's footer.
set_color
¶
Set this embed's color with a hex.
Parameters:
-
hex
(str
) –color as a hex code (format: #FFFFFF)
Returns:
-
EmbedBuilder
–self
set_user_author
¶
set_image
¶
Set this embed's image.
Parameters:
-
url
(str
) –attachment://
scheme or http(s) URL
Returns:
-
EmbedBuilder
–self
set_thumbnail
¶
Set this embed's thumbnail.
Parameters:
-
url
(str
) –attachment://
scheme or http(s) URL
Returns:
-
EmbedBuilder
–self
set_footer
¶
Set this embed's footer.
Parameters:
-
text
(str
) –footer's text
-
icon_url
(str
, default:None
) –attachment://
scheme or http(s) URL.
Returns:
-
EmbedBuilder
–self
add_field
¶
Add a field to this embed.
Parameters:
-
name
(str
) –field's title
-
value
(str
) –field's text
-
is_inline
(bool
, default:False
) –if this field should be inlined
Returns:
-
EmbedBuilder
–self