Skip to content

setNotificationSettings

Sahri Riza Umami edited this page Mar 15, 2017 · 4 revisions

Changes notification settings for given scope.

setNotificationSettings(scope, chat_id, mute_for, show_preview)
Option Description
scope Scope to change notification settings. The scopes are Chat (chat_id), PrivateChats, GroupChats, and AllChats.
chat_id Chat identifier.
mute_for Time left before notifications will be unmuted.
show_preview Display message text/media in notification.

Example

  • Notification settings applied to 1234567890 chat.

    setNotificationSettings('Chat', 1234567890, 20, 0)
  • Notification settings applied to all private chats.

    setNotificationSettings('Chat', nil, 20, 0)
  • Notification settings applied to all group chats.

    setNotificationSettings('Chat', nil, 20, 0)
  • Notification settings applied to all chats.

    setNotificationSettings('Chat', nil, 20, 0)

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally