в общем, есть функция которая получает папки с аккаунта: from telethon.tl.functions.messages import GetDialogFiltersRequest from telethon.tl.types import DialogFilter async def get_folders(client): result = await client(GetDialogFiltersRequest()) folders = result.filters folder_names = [] if folders: for folder in folders: if isinstance(folder, DialogFilter): folder_names.append(folder.title) return folder_names Python from telethon.tl.functions.messages import GetDialogFiltersRequest from telethon.tl.types import DialogFilter async def get_folders(client): result = await client(GetDialogFiltersRequest()) folders = result.filters folder_names = [] if folders: for folder in folders: if isinstance(folder, DialogFilter): folder_names.append(folder.title) return folder_names у меня на аккаунте есть 1 общая папка ( которую я добавил по ссылки ). бот пишет только те папки которые я сделал сам, можно ли как-то исправить это? в интернете не нашол гуглить не умею
InfernLife, from telethon.tl.functions.messages import GetDialogFiltersRequest from telethon.tl.types import DialogFilter, DialogFilterChatlist async def get_folders(client): result = await client(GetDialogFiltersRequest()) folders = result.filters folder_names = [] if folders: for folder in folders: if isinstance(folder, (DialogFilter, DialogFilterChatlist)): folder_names.append(folder.title) else: print(f"Unknown folder type: {type(folder)}") # Отладочная информация return folder_names