get_chat_settings()

Client.get_chat_settings()

Get the settings (peer settings) of a chat or user.

Settings include flags such as whether you can report the peer for spam, add them as a contact, whether the chat was auto-archived, etc.

Parameters:

chat_id (int | str) – Unique identifier (int) or username of the target chat/user.

Returns:

ChatSettings – On success.

Raises:

raises ValueError: If the peer cannot be resolved (not joined / invalid).

Example

settings = await app.get_chat_settings("me")
print(settings.add_contact, settings.report_spam)