EditPeerFoldersRequest

Only users can use this request. See code examples.

---functions---
folders.editPeerFolders#6847d0ab folder_peers:Vector<InputFolderPeer> = Updates

Returns

Updates

This type can be an instance of either:

UpdateShortUpdateShortChatMessage
UpdateShortMessageUpdateShortSentMessage
UpdatesUpdatesCombined
UpdatesTooLong

Parameters

folder_peersInputFolderPeerA list must be supplied.

Known RPC errors

This request can cause 1 known error:

FolderIdInvalidErrorThe folder you tried to use was not valid.

You can import these from telethon.errors.

Example

Please refer to the documentation of client.edit_folder() to learn about the parameters and see several code examples on how to use it.

The method above is the recommended way to do it. If you need more control over the parameters or want to learn how it is implemented, open the details by clicking on the "Details" text.

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.folders.EditPeerFoldersRequest(
        folder_peers=[types.InputFolderPeer(
            peer='username',
            folder_id=42
        )]
    ))
    print(result.stringify())