set_chat_protected_content()#
- Client.set_chat_protected_content()#
Set the chat protected content setting.
Usable by Users BotsChanges the ability of users to save, forward, or copy chat content.
Requires owner privileges in basic groups, supergroups and channels. Requires Telegram Premium to enable protected content in private chats. Not available in Saved Messages and private chats with bots or support accounts.
- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.enabled (
bool) – Pass True to enable the protected content setting, False to disable.
- Returns:
Message|bool– On success, a service message will be returned (when applicable), otherwise, in case a message object couldn’t be returned, True is returned.- Raises:
RPCError – In case of a Telegram RPCError.