mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Merge branch 'develop' of https://github.com/pyrogram/pyrogram into develop
This commit is contained in:
commit
3f4441d0f5
@ -2743,7 +2743,7 @@ class Message(Object, Update):
|
|||||||
revoke=revoke
|
revoke=revoke
|
||||||
)
|
)
|
||||||
|
|
||||||
def click(self, x: int or str, y: int = 0, quote: bool = None, timeout: int = 10):
|
def click(self, x: int or str = 0, y: int = None, quote: bool = None, timeout: int = 10):
|
||||||
"""Bound method *click* of :obj:`Message`.
|
"""Bound method *click* of :obj:`Message`.
|
||||||
|
|
||||||
Use as a shortcut for clicking a button attached to the message instead of:
|
Use as a shortcut for clicking a button attached to the message instead of:
|
||||||
|
@ -279,21 +279,21 @@ class User(Object, Update):
|
|||||||
|
|
||||||
def block(self):
|
def block(self):
|
||||||
"""Bound method *block* of :obj:`User`.
|
"""Bound method *block* of :obj:`User`.
|
||||||
|
|
||||||
Use as a shortcut for:
|
Use as a shortcut for:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
client.block_user(123456789)
|
client.block_user(123456789)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
user.block()
|
user.block()
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True on success.
|
True on success.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
RPCError: In case of a Telegram RPC error.
|
RPCError: In case of a Telegram RPC error.
|
||||||
"""
|
"""
|
||||||
@ -302,23 +302,46 @@ class User(Object, Update):
|
|||||||
|
|
||||||
def unblock(self):
|
def unblock(self):
|
||||||
"""Bound method *unblock* of :obj:`User`.
|
"""Bound method *unblock* of :obj:`User`.
|
||||||
|
|
||||||
Use as a shortcut for:
|
Use as a shortcut for:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
client.unblock_user(123456789)
|
client.unblock_user(123456789)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
user.unblock()
|
user.unblock()
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True on success.
|
True on success.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
RPCError: In case of a Telegram RPC error.
|
RPCError: In case of a Telegram RPC error.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self._client.unblock_user(self.id)
|
return self._client.unblock_user(self.id)
|
||||||
|
|
||||||
|
def get_common_chats(self):
|
||||||
|
"""Bound method *get_common_chats* of :obj:`User`.
|
||||||
|
|
||||||
|
Use as a shortcut for:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
client.get_common_chats(123456789)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
user.get_common_chats()
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
True on success.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
RPCError: In case of a Telegram RPC error.
|
||||||
|
"""
|
||||||
|
|
||||||
|
return self._client.get_common_chats(self.id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user