mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Merge pull request #279 from kalmengr/patch-5
Add retract_vote bound method to Message
This commit is contained in:
commit
0b66cf2cb9
@ -2868,6 +2868,38 @@ class Message(Object, Update):
|
||||
raise ValueError("This button is not supported yet")
|
||||
else:
|
||||
self.reply(button, quote=quote)
|
||||
|
||||
|
||||
def retract_vote(
|
||||
self,
|
||||
) -> "Poll":
|
||||
"""Bound method *retract_vote* of :obj:`Message`.
|
||||
|
||||
Use as a shortcut for:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
client.retract_vote(
|
||||
chat_id=message.chat.id,
|
||||
message_id=message_id,
|
||||
)
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
message.retract_vote()
|
||||
|
||||
Returns:
|
||||
:obj:`Poll`: On success, the poll with the retracted vote is returned.
|
||||
|
||||
Raises:
|
||||
RPCError: In case of a Telegram RPC error.
|
||||
"""
|
||||
|
||||
return self._client.retract_vote(
|
||||
chat_id=self.chat.id,
|
||||
message_id=self.message_id
|
||||
)
|
||||
|
||||
def download(
|
||||
self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user