Search code examples
pythontelegramtelethon

how to get chat folders? - telethon


I'm trying to get the chat folders using telethon

I'm not sure what to do and there's nothing I found in the documentation. Can anyone help?


Solution

  • Folders are called Filters in the full api, you can get them with GetDialogFilters

    req = await client(functions.messages.GetDialogFiltersRequest())
    

    The req will be of type DialogFilter which can be either of:

    • DialogFilterDefault: ignore it, it was added as premium feature to sort "All" tab

    • DialogFilter: This is a Folder basically, it contains title, included chats, pinned, excluded, etc..

    Get the existing fields at auto generated TL site or their info @official TG site