set_chat_ttl()¶
- Client.set_chat_ttl()
Set the time-to-live for the chat.
Usable by Users Bots
- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.ttl_seconds (
int) – The time-to-live for the chat. Either 86000 for 1 day, 604800 for 1 week or 0 (zero) to disable it.
- Returns:
bool– True on success.
Example
await app.set_chat_ttl(chat_id, 86400) await app.set_chat_ttl(chat_id, 604800) await app.set_chat_ttl(chat_id, 0)