Iterate through a user’s dialogs sequentially.
This convenience method does the same as repeatedly calling
get_dialogs()in a loop, thus saving you from the hassle of setting up boilerplate code. It is useful for getting the whole dialogs list with a single call.
int) – The offset date in Unix time taken from the top message of a
Dialog. Defaults to 0 (most recent dialog).
int, optional) – Limits the number of dialogs to be retrieved. By default, no limit is applied and all dialogs are returned.
Generator– A generator yielding
# Iterate through all dialogs for dialog in app.iter_dialogs(): print(dialog.chat.first_name or dialog.chat.title)