GetSavedDialogsRequest
Both users and bots may be able to use this request. See code examples.
---functions--- messages.getSavedDialogs#5381d21a flags:# exclude_pinned:flags.0?true offset_date:date offset_id:int offset_peer:InputPeer limit:int hash:long = messages.SavedDialogs
Returns
| messages.SavedDialogs |
This type can be an instance of either:
| SavedDialogs | SavedDialogsNotModified |
| SavedDialogsSlice |
Parameters
| offset_date | date | |
| offset_id | int | |
| offset_peer | InputPeer | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.). |
| limit | int | |
| hash | long | |
| exclude_pinned | flag | This argument defaults to None and can be omitted. |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.messages.GetSavedDialogsRequest(
offset_date=datetime.datetime(2018, 6, 25),
offset_id=42,
offset_peer='username',
limit=100,
hash=-12398745604826,
exclude_pinned=True
))
print(result.stringify())