Skip to content
Back to top
View this page

# PollMedia

class telegram.PollMedia(animation=None, audio=None, document=None, live_photo=None, location=None, photo=None, sticker=None, venue=None, video=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  At most one of the optional fields can be present in any given object.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if all of their attributes are equal.

  Available In

  - `telegram.Poll.explanation_media`

  - `telegram.Poll.media`

  - `telegram.PollOption.media`

  Added in version 22.8.

  Parameters:

    - animation (`telegram.Animation`, optional) – Media is an animation, information about the animation

    - audio (`telegram.Audio`, optional) – Media is an audio file, information about the file; currently, can’t be received in a poll option

    - document (`telegram.Document`, optional) – Media is a general file, information about the file; currently, can’t be received in a poll option

    - live_photo (`telegram.LivePhoto`, optional) – Media is a live photo, information about the live photo

    - location (`telegram.Location`, optional) – Media is a shared location, information about the location

    - photo (Sequence[`telegram.PhotoSize`], optional) – Media is a photo, available sizes of the photo

    - sticker (`telegram.Sticker`, optional) – Media is a sticker, information about the sticker; currently, for poll options only

    - venue (`telegram.Venue`, optional) – Media is a venue, information about the venue

    - video (`telegram.Video`, optional) – Media is a video, information about the video

  animation

    Optional. Media is an animation, information about the animation

    Type:

      `telegram.Animation`

  audio

    Optional. Media is an audio file, information about the file; currently, can’t be received in a poll option

    Type:

      `telegram.Audio`

  document

    Optional. Media is a general file, information about the file; currently, can’t be received in a poll option

    Type:

      `telegram.Document`

  live_photo

    Media is a live photo, information about the live photo

    Type:

      `telegram.LivePhoto`, optional

  location

    Optional. Media is a shared location, information about the location

    Type:

      `telegram.Location`

  photo

    Optional. Media is a photo, available sizes of the photo

    Type:

      tuple[`telegram.PhotoSize`]

  sticker

    Optional. Media is a sticker, information about the sticker; currently, for poll options only

    Type:

      `telegram.Sticker`

  venue

    Optional. Media is a venue, information about the venue

    Type:

      `telegram.Venue`

  video

    Optional. Media is a video, information about the video

    Type:

      `telegram.Video`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.