|
1 | | -# Pyrofork - Telegram MTProto API Client Library for Python |
| 1 | +# Pyrogram - Telegram MTProto API Client Library for Python |
2 | 2 | # Copyright (C) 2017-present Dan <https://github.com/delivrance> |
3 | | -# Copyright (C) 2022-present Mayuri-Chan <https://github.com/Mayuri-Chan> |
4 | 3 | # |
5 | | -# This file is part of Pyrofork. |
| 4 | +# This file is part of Pyrogram. |
6 | 5 | # |
7 | | -# Pyrofork is free software: you can redistribute it and/or modify |
| 6 | +# Pyrogram is free software: you can redistribute it and/or modify |
8 | 7 | # it under the terms of the GNU Lesser General Public License as published |
9 | 8 | # by the Free Software Foundation, either version 3 of the License, or |
10 | 9 | # (at your option) any later version. |
11 | 10 | # |
12 | | -# Pyrofork is distributed in the hope that it will be useful, |
| 11 | +# Pyrogram is distributed in the hope that it will be useful, |
13 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | 14 | # GNU Lesser General Public License for more details. |
16 | 15 | # |
17 | 16 | # 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/>. |
19 | 18 |
|
20 | 19 | from datetime import datetime |
21 | 20 | from typing import List, Union, Optional |
@@ -247,45 +246,3 @@ async def _parse_update( |
247 | 246 | recent_voters=recent_voters if len(recent_voters) > 0 else None, |
248 | 247 | client=client |
249 | 248 | ) |
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