archive_chats()

Client.archive_chats()

Archive one or more chats.

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).

Returns

bool – On success, True is returned.

Example

# Archive chat
app.archive_chats(chat_id)

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