aiotdlib icon indicating copy to clipboard operation
aiotdlib copied to clipboard

how to get chat folder by folder name?

Open shared-object opened this issue 1 year ago • 4 comments

how to get chat folder by folder name?

shared-object avatar Oct 25 '24 08:10 shared-object

Get all folders and iterate over them

pylakey avatar Oct 25 '24 21:10 pylakey

there is no method in this lib

shared-object avatar Oct 26 '24 14:10 shared-object

to get folders

shared-object avatar Oct 26 '24 14:10 shared-object

and canu add prebuild windows binarie? i can send you

shared-object avatar Oct 26 '24 14:10 shared-object

You need to add event handler for API.Types.UPDATE_CHAT_FOLDERS event. It contains all the information about chat folders

Example:

client = Client()

async def on_update_chat_folders(self, _: Client, update: UpdateChatFolders):
    print(update.chat_folders)

update_chat_folders_handler = client.add_event_handler(on_update_chat_folders, API.Types.UPDATE_CHAT_FOLDERS)

pylakey avatar Feb 01 '25 20:02 pylakey