update_chat_notifications()¶
- Client.update_chat_notifications()
Update the notification settings for the selected chat
- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.mute (
bool, optional) – Pass True if you want to mute chat.mute_until (
datetime, optional) – Date when the user will be unmuted. Works only if the mute parameter is set to True. Defaults to forever.stories_muted (
bool, optional) – Pass True to mute stories notifications.stories_hide_sender (
bool, optional) – Pass True to hide stories sender name.show_previews (
bool, optional) – If the text of the message shall be displayed in notification.
- Returns:
bool– True on success, False otherwise.
Example
await app.update_chat_notifications(chat_id, mute=True) await app.update_chat_notifications( chat_id, mute=True, mute_until=datetime.now() + timedelta(minutes=10) ) await app.update_chat_notifications(chat_id, mute=False)