Skip to content

Commit 914104d

Browse files
committed
Revert "Add bound method stop() to the Poll object"
This reverts commit 165ade9. Signed-off-by: wulan17 <wulan17@nusantararom.org>
1 parent f763fb7 commit 914104d

File tree

1 file changed

+5
-48
lines changed
  • pyrogram/types/messages_and_media

1 file changed

+5
-48
lines changed

pyrogram/types/messages_and_media/poll.py

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
# Pyrofork - Telegram MTProto API Client Library for Python
1+
# Pyrogram - Telegram MTProto API Client Library for Python
22
# Copyright (C) 2017-present Dan <https://github.com/delivrance>
3-
# Copyright (C) 2022-present Mayuri-Chan <https://github.com/Mayuri-Chan>
43
#
5-
# This file is part of Pyrofork.
4+
# This file is part of Pyrogram.
65
#
7-
# Pyrofork is free software: you can redistribute it and/or modify
6+
# Pyrogram is free software: you can redistribute it and/or modify
87
# it under the terms of the GNU Lesser General Public License as published
98
# by the Free Software Foundation, either version 3 of the License, or
109
# (at your option) any later version.
1110
#
12-
# Pyrofork is distributed in the hope that it will be useful,
11+
# Pyrogram is distributed in the hope that it will be useful,
1312
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1413
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1514
# GNU Lesser General Public License for more details.
1615
#
1716
# You should have received a copy of the GNU Lesser General Public License
18-
# along with Pyrofork. If not, see <http://www.gnu.org/licenses/>.
17+
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1918

2019
from datetime import datetime
2120
from typing import List, Union, Optional
@@ -247,45 +246,3 @@ async def _parse_update(
247246
recent_voters=recent_voters if len(recent_voters) > 0 else None,
248247
client=client
249248
)
250-
251-
async def stop(
252-
self,
253-
reply_markup: "types.InlineKeyboardMarkup" = None,
254-
business_connection_id: str = None
255-
) -> "types.Poll":
256-
"""Bound method *stop* of :obj:`~pyrogram.types.Poll`.
257-
258-
Use as a shortcut for:
259-
260-
.. code-block:: python
261-
262-
client.stop_poll(
263-
chat_id=message.chat.id,
264-
message_id=message.id,
265-
)
266-
267-
Parameters:
268-
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
269-
An InlineKeyboardMarkup object.
270-
271-
business_connection_id (``str``, *optional*):
272-
Unique identifier of the business connection.
273-
274-
Example:
275-
.. code-block:: python
276-
277-
message.poll.stop()
278-
279-
Returns:
280-
:obj:`~pyrogram.types.Poll`: On success, the stopped poll with the final results is returned.
281-
282-
Raises:
283-
RPCError: In case of a Telegram RPC error.
284-
"""
285-
286-
return await self._client.stop_poll(
287-
chat_id=self.chat.id,
288-
message_id=self.id,
289-
reply_markup=reply_markup,
290-
business_connection_id=self.business_connection_id if business_connection_id is None else business_connection_id
291-
)

0 commit comments

Comments
 (0)