set_global_privacy_settings()¶
- Client.set_global_privacy_settings()¶
Set account global privacy settings.
Usable by Users Bots- Parameters:
archive_and_mute_new_chats (
bool, optional) – Whether to archive and mute new chats from non-contacts,keep_unmuted_chats_archived (
bool, optional) – Whether unmuted chats will be kept in the Archive chat list when they get a new message.keep_chats_from_folders_archived (
bool, optional) – Whether unmuted chats, that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_unmuted_chats_archived is set.show_read_date (
bool, optional) – True, if message read date is shown to other users in private chats. If false and the current user isn’t a Telegram Premium user, then they will not be able to see other’s message read date.allow_new_chats_from_unknown_users (
bool, optional) – True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting.incoming_paid_message_star_count (
int, optional) – Number of Telegram Stars that must be paid for every incoming private message by non-contacts. Must be between 0-paid_message_star_count_max. If positive, then allow_new_chats_from_unknown_users must be true. The current user will receivepaid_message_earnings_per_milleTelegram Stars for each 1000 Telegram Stars paid for message sending.show_gift_button (
bool, optional) – True, if a button for sending a gift to the user or by the user must be always shown in the input field.accepted_gift_types (
AcceptedGiftTypes, optional) – Information about gifts that can be received by the user.
- Returns:
GlobalPrivacySettings– On success, the new global privacy settings is returned.
Example
# Archive new chats await app.set_global_privacy_settings( archive_and_mute_new_chats=True ) # Set price for incoming messages await app.set_global_privacy_settings( incoming_paid_message_star_count=10 )