MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / __init__

Method __init__

src/telegram/_poll.py:119–156  ·  view source on GitHub ↗
(
        self,
        animation: Animation | None = None,
        audio: Audio | None = None,
        document: Document | None = None,
        live_photo: LivePhoto | None = None,
        location: Location | None = None,
        photo: Sequence[PhotoSize] | None = None,
        sticker: Sticker | None = None,
        venue: Venue | None = None,
        video: Video | None = None,
        *,
        api_kwargs: JSONDict | None = None,
    )

Source from the content-addressed store, hash-verified

117 )
118
119 def __init__(
120 self,
121 animation: Animation | None = None,
122 audio: Audio | None = None,
123 document: Document | None = None,
124 live_photo: LivePhoto | None = None,
125 location: Location | None = None,
126 photo: Sequence[PhotoSize] | None = None,
127 sticker: Sticker | None = None,
128 venue: Venue | None = None,
129 video: Video | None = None,
130 *,
131 api_kwargs: JSONDict | None = None,
132 ):
133 super().__init__(api_kwargs=api_kwargs)
134 self.animation: Animation | None = animation
135 self.audio: Audio | None = audio
136 self.document: Document | None = document
137 self.live_photo: LivePhoto | None = live_photo
138 self.location: Location | None = location
139 self.photo: tuple[PhotoSize, ...] = parse_sequence_arg(photo)
140 self.sticker: Sticker | None = sticker
141 self.venue: Venue | None = venue
142 self.video: Video | None = video
143
144 self._id_attrs = (
145 self.animation,
146 self.audio,
147 self.document,
148 self.live_photo,
149 self.location,
150 self.photo,
151 self.sticker,
152 self.venue,
153 self.video,
154 )
155
156 self._freeze()
157
158 @classmethod
159 def de_json(cls, data: JSONDict, bot: "Bot | None" = None) -> "PollMedia":

Callers

nothing calls this directly

Calls 3

parse_sequence_argFunction · 0.90
_freezeMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected