Embeds¶
The following section documents everything related to embeds. Embeds usually can be found inside messages.
Models¶
BaseEmbed¶
- def attach_state
BaseEmbedSpecial¶
NoneEmbedSpecial¶
- def to_dict
GIFEmbedSpecial¶
- def to_dict
YouTubeEmbedSpecial¶
LightspeedEmbedSpecial¶
- def to_dict
- class stoat.LightspeedEmbedSpecial(*, content_type, id)[source]¶
Represents information about Lightspeed.tv stream.
This inherits from
BaseEmbedSpecial.- content_type¶
The Lightspeed.tv content type.
- Type:
TwitchEmbedSpecial¶
- def to_dict
- class stoat.TwitchEmbedSpecial(*, content_type, id)[source]¶
Represents information about Twitch stream or clip.
This inherits from
BaseEmbedSpecial.- content_type¶
The Twitch content type.
- Type:
SpotifyEmbedSpecial¶
- def to_dict
SoundcloudEmbedSpecial¶
- def to_dict
BandcampEmbedSpecial¶
- def to_dict
- class stoat.BandcampEmbedSpecial(*, content_type, id)[source]¶
Represents information about Bandcamp track.
This inherits from
BaseEmbedSpecial.- content_type¶
The Bandcamp content type.
- Type:
AppleMusicEmbedSpecial¶
- class stoat.AppleMusicEmbedSpecial(*, album_id, track_id)[source]¶
Represents information about Apple Music track.
This inherits from
BaseEmbedSpecial.
StreamableEmbedSpecial¶
ImageEmbed¶
VideoEmbed¶
- def attach_state
- def to_dict
WebsiteEmbed¶
- def attach_state
- def to_dict
- class stoat.WebsiteEmbed(*, url, original_url, special, title, description, image, video, site_name, icon_url, color)[source]¶
Represents website embed within Stoat message.
This inherits from
BaseEmbed.- special¶
The remote content.
- Type:
Optional[
EmbedSpecial]
- image¶
The embedded image.
- Type:
Optional[
ImageEmbed]
- video¶
The embedded video.
- Type:
Optional[
VideoEmbed]
StatelessTextEmbed¶
- def attach_state
- def to_dict
- class stoat.StatelessTextEmbed(*, icon_url, url, title, description, internal_media, color)[source]¶
Represents stateless text embed within Stoat message.
This inherits from
BaseEmbed.- internal_media¶
The stateless embed media.
- Type:
Optional[
StatelessAsset]
TextEmbed¶
- def attach_state
- def to_dict
- class stoat.TextEmbed(*, icon_url, url, title, description, internal_media, color, state)[source]¶
Represents a text embed within Stoat message.
This is a stateful version of
StatelessTextEmbed, and inherits from it.- attach_state(state, /)[source]¶
Embed: Attach a state to embed.- Parameters:
state (
State) – The state to attach.
- internal_media¶
The stateless embed media.
- Type:
Optional[
StatelessAsset]
NoneEmbed¶
- def attach_state
- def to_dict
EmbedSpecial¶
- class stoat.EmbedSpecial¶
An union of all embed special types.
The following classes are included in this union:
StatelessEmbed¶
- class stoat.StatelessEmbed¶
An union of all stateless embed types.
The following classes are included in this union:
Embed¶
- class stoat.Embed¶
An union of all embed types.
The following classes are included in this union:
SendableEmbed¶
- class stoat.SendableEmbed(title=None, description=None, *, icon_url=None, url=None, media=None, color=None)[source]¶
Represents a text embed before it is sent.
- media¶
The file inside the embed.
- Type:
Optional[
ResolvableResource]