peyk.platforms.bale.types.animation

Classes

Animation(file_id, file_unique_id, width, ...)

Represent the Bale Bot API Animation object.

class peyk.platforms.bale.types.animation.Animation(file_id: str, file_unique_id: str, width: int, height: int, duration: int, thumbnail: PhotoSize | None = None, file_name: str | None = None, mime_type: str | None = None, file_size: int | None = None)[source]

Bases: object

Represent the Bale Bot API Animation object.

Preserves the existing dataclass fields and parsing behavior.

file_id: str
file_unique_id: str
width: int
height: int
duration: int
thumbnail: PhotoSize | None = None
file_name: str | None = None
mime_type: str | None = None
file_size: int | None = None
classmethod from_dict(data: dict | None) Animation | None[source]

Parse raw Bale data into Animation.

Parameters:

data (Optional[dict]) – Raw API object or None.

Returns:

Parsed object or None.

Return type:

Optional[Animation]

Raises:

KeyError – If a required raw field is missing.