diff --git a/pyrogram/client/methods/chats/get_dialogs.py b/pyrogram/client/methods/chats/get_dialogs.py index 0e04423c..757cf5bc 100644 --- a/pyrogram/client/methods/chats/get_dialogs.py +++ b/pyrogram/client/methods/chats/get_dialogs.py @@ -23,7 +23,7 @@ from ...ext import BaseClient class GetDialogs(BaseClient): def get_dialogs(self, - offset_dialog: "pyrogram.Dialog" = None, + offset_date: int = 0, limit: int = 100, pinned_only: bool = False) -> "pyrogram.Dialogs": """Use this method to get the user's dialogs @@ -31,13 +31,13 @@ class GetDialogs(BaseClient): You can get up to 100 dialogs at once. Args: - offset_dialog (:obj:`Dialog`): - Sequential Dialog of the first dialog to be returned. - Defaults to None (start from the beginning). + offset_date (``int``): + The offset date in Unix time taken from the top message of a :obj:`Dialog`. + Defaults to 0. Valid for non-pinned dialogs only. limit (``str``, *optional*): Limits the number of dialogs to be retrieved. - Defaults to 100. + Defaults to 100. Valid for non-pinned dialogs only. pinned_only (``bool``, *optional*): Pass True if you want to get only pinned dialogs. @@ -55,7 +55,7 @@ class GetDialogs(BaseClient): else: r = self.send( functions.messages.GetDialogs( - offset_date=offset_dialog.top_message.date if offset_dialog else 0, + offset_date=offset_date, offset_id=0, offset_peer=types.InputPeerEmpty(), limit=limit,