Skip to content

Commit 3f4441d

Browse files
committed
Merge branch 'develop' of https://github.com/pyrogram/pyrogram into develop
2 parents fb77144 + d15d38b commit 3f4441d

2 files changed

Lines changed: 38 additions & 15 deletions

File tree

pyrogram/client/types/messages_and_media/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2743,7 +2743,7 @@ def delete(self, revoke: bool = True):
27432743
revoke=revoke
27442744
)
27452745

2746-
def click(self, x: int or str, y: int = 0, quote: bool = None, timeout: int = 10):
2746+
def click(self, x: int or str = 0, y: int = None, quote: bool = None, timeout: int = 10):
27472747
"""Bound method *click* of :obj:`Message`.
27482748
27492749
Use as a shortcut for clicking a button attached to the message instead of:

pyrogram/client/types/user_and_chats/user.py

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,21 @@ def unarchive(self):
279279

280280
def block(self):
281281
"""Bound method *block* of :obj:`User`.
282-
282+
283283
Use as a shortcut for:
284-
284+
285285
.. code-block:: python
286-
286+
287287
client.block_user(123456789)
288-
288+
289289
Example:
290290
.. code-block:: python
291-
291+
292292
user.block()
293-
293+
294294
Returns:
295295
True on success.
296-
296+
297297
Raises:
298298
RPCError: In case of a Telegram RPC error.
299299
"""
@@ -302,23 +302,46 @@ def block(self):
302302

303303
def unblock(self):
304304
"""Bound method *unblock* of :obj:`User`.
305-
305+
306306
Use as a shortcut for:
307-
307+
308308
.. code-block:: python
309-
309+
310310
client.unblock_user(123456789)
311-
311+
312312
Example:
313313
.. code-block:: python
314-
314+
315315
user.unblock()
316-
316+
317317
Returns:
318318
True on success.
319-
319+
320320
Raises:
321321
RPCError: In case of a Telegram RPC error.
322322
"""
323323

324324
return self._client.unblock_user(self.id)
325+
326+
def get_common_chats(self):
327+
"""Bound method *get_common_chats* of :obj:`User`.
328+
329+
Use as a shortcut for:
330+
331+
.. code-block:: python
332+
333+
client.get_common_chats(123456789)
334+
335+
Example:
336+
.. code-block:: python
337+
338+
user.get_common_chats()
339+
340+
Returns:
341+
True on success.
342+
343+
Raises:
344+
RPCError: In case of a Telegram RPC error.
345+
"""
346+
347+
return self._client.get_common_chats(self.id)

0 commit comments

Comments
 (0)