curious.dataclasses.embed

Wrappers for Embed objects.

Classes

Embed(*, title, description, colour, type_, …) Represents an Embed object on Discord.
class curious.dataclasses.embed.Embed(*, title: str = None, description: str = None, colour: int = None, type_: str = None, url: str = None, timestamp: str = None, **kwargs)[source]

Bases: object

Represents an Embed object on Discord.

title = None

The title of this embed.

description = None

The description of this embed.

colour = None

The colour of this embed.

type_ = None

The type of this embed.

url = None

The URL for this embed.

timestamp = None

The timestamp for this embed.

fields = None

The fields for this embed.

footer = None

The footer for this embed.

author = None

The author of this embed.

image = None

The image for this embed.

video = None

The video for this embed.

thumbnail = None

The thumbnail for this embed.

add_field(*, name, value, inline=True)[source]

Adds a field to the embed.

Parameters:
  • name (str) – The field name.
  • value (str) – The field value.
  • inline (bool) – Is this field inline?
Return type:

Embed

Returns:

The Embed object.

set_author(*, name, url=None, icon_url=None)[source]

Sets the author of this embed.

Parameters:
  • name (str) – The name of the author.
  • url (Optional[str]) – The URL of the author.
  • icon_url (Optional[str]) – The URL of the author icon.
Return type:

Embed

Returns:

The Embed object.

Sets the footer of this embed.

Parameters:
  • text (Optional[str]) – The footer text of this embed.
  • icon_url (Optional[str]) – The icon URL for the footer.
Return type:

Embed

Returns:

The Embed object.

set_image(*, image_url)[source]

Sets the image of this embed.

Parameters:image_url (str) – The image URL of this embed.
Return type:Embed
Returns:The Embed object.
set_thumbnail(*, url)[source]

Sets the thumbnail image of this embed.

Parameters:url (str) – The image URL of this thumbnail.
Return type:Embed
Returns:The Embed object.
to_dict()[source]

Converts this embed into a flattened dict.

Return type:dict