File tree Expand file tree Collapse file tree
pyrogram/types/messages_and_media Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,3 +201,40 @@ def _parse_update(client, update: "raw.types.UpdateMessagePoll"):
201201 correct_option_id = correct_option_id ,
202202 client = client
203203 )
204+
205+ async def stop (
206+ self ,
207+ reply_markup : "types.InlineKeyboardMarkup" = None
208+ ) -> "types.Poll" :
209+ """Bound method *stop* of :obj:`~pyrogram.types.Poll`.
210+
211+ Use as a shortcut for:
212+
213+ .. code-block:: python
214+
215+ client.stop_poll(
216+ chat_id=message.chat.id,
217+ message_id=message.id,
218+ )
219+
220+ Parameters:
221+ reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
222+ An InlineKeyboardMarkup object.
223+
224+ Example:
225+ .. code-block:: python
226+
227+ message.poll.stop()
228+
229+ Returns:
230+ :obj:`~pyrogram.types.Poll`: On success, the stopped poll with the final results is returned.
231+
232+ Raises:
233+ RPCError: In case of a Telegram RPC error.
234+ """
235+
236+ return await self ._client .stop_poll (
237+ chat_id = self .chat .id ,
238+ message_id = self .id ,
239+ reply_markup = reply_markup
240+ )
You can’t perform that action at this time.
0 commit comments