update_chat_notifications()¶
- async Client.update_chat_notifications()¶
Update the notification settings of a chat.
Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.mute (
bool, optional) – Pass True to mute the chat, False to unmute it.mute_until (
datetime, optional) – Date when the chat will be unmuted. Defaults to forever. Only used when mute is True.show_previews (
bool, optional) – Pass True to show message previews in notifications, False to hide them.
- Returns:
bool– On success, True is returned.
Example
# Mute a chat forever await app.update_chat_notifications(chat_id, mute=True) # Unmute a chat await app.update_chat_notifications(chat_id, mute=False)