archive_chats()

Client.archive_chats()

Archive one or more chats.

Usable by Users Bots
Parameters:

chat_ids (int | str | List[int, str]) – Unique identifier (int) or username (str) of the target chat. You can also pass a list of ids (int) or usernames (str). You can also use chat public link in form of t.me/<username> (str).

Returns:

bool – On success, True is returned.

Example

# Archive chat
await app.archive_chats(chat_id)

# Archive multiple chats at once
await app.archive_chats([chat_id1, chat_id2, chat_id3])