mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 05:48:14 +00:00
Add bound method for get_common_chats (#305)
This commit is contained in:
parent
55f5a1a36c
commit
b74a8eba5e
@ -279,21 +279,21 @@ class User(Object, Update):
|
||||
|
||||
def block(self):
|
||||
"""Bound method *block* of :obj:`User`.
|
||||
|
||||
|
||||
Use as a shortcut for:
|
||||
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
client.block_user(123456789)
|
||||
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
user.block()
|
||||
|
||||
|
||||
Returns:
|
||||
True on success.
|
||||
|
||||
|
||||
Raises:
|
||||
RPCError: In case of a Telegram RPC error.
|
||||
"""
|
||||
@ -302,23 +302,46 @@ class User(Object, Update):
|
||||
|
||||
def unblock(self):
|
||||
"""Bound method *unblock* of :obj:`User`.
|
||||
|
||||
|
||||
Use as a shortcut for:
|
||||
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
client.unblock_user(123456789)
|
||||
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
user.unblock()
|
||||
|
||||
|
||||
Returns:
|
||||
True on success.
|
||||
|
||||
|
||||
Raises:
|
||||
RPCError: In case of a Telegram RPC error.
|
||||
"""
|
||||
|
||||
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