From ff469acb8152d2eaf5fc49838efa10e65b8fcbf5 Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" Date: Fri, 5 May 2017 23:11:48 +1000 Subject: [PATCH] TelegramClient.get_dialogs: Rename 'count' argument to 'limit' (#72) --- telethon/telegram_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index b363cbc8..d5190edc 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -286,11 +286,12 @@ class TelegramClient: # region Dialogs ("chats") requests def get_dialogs(self, - count=10, + limit=10, offset_date=None, offset_id=0, offset_peer=InputPeerEmpty()): - """Returns a tuple of lists ([dialogs], [entities]) with 'count' items each. + """Returns a tuple of lists ([dialogs], [entities]) with at least 'limit' items each. + If `limit` is 0, all dialogs will be retrieved. The `entity` represents the user, chat or channel corresponding to that dialog""" r = self.invoke( @@ -298,7 +299,7 @@ class TelegramClient: offset_date=offset_date, offset_id=offset_id, offset_peer=offset_peer, - limit=count)) + limit=limit)) return ( r.dialogs, [find_user_or_chat(d.peer, r.users, r.chats) for d in r.dialogs])