payments.ToggleChatStarGiftNotifications

class pyrogram.raw.functions.payments.ToggleChatStarGiftNotifications

Enables or disables the reception of notifications every time a gift » is received by the specified channel, can only be invoked by admins with post_messages admin rights.

Details:
  • Layer: 223

  • ID: 60EAEFA1

Parameters:
  • peer (InputPeer) – The channel for which to receive or not receive notifications.

  • enabled (bool, optional) – Whether to enable or disable reception of notifications in the form of messageActionStarGiftUnique and messageActionStarGift service messages from the channel.

Returns:

bool

TL Schema

payments.toggleChatStarGiftNotifications#60eaefa1
flags:#
enabled:flags.0?true
peer:InputPeer

= Bool

Parameter Tree

ToggleChatStarGiftNotifications
├── enabledtrue (optional)
└── peerInputPeer
├── InputPeerEmpty
├── InputPeerSelf
├── InputPeerChat
│ └── chat_idlong
├── InputPeerUser
│ ├── user_idlong
│ └── access_hashlong
│ ├── channel_idlong
│ └── access_hashlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_idint
└── channel_idlong

Example

await app.invoke(
    ToggleChatStarGiftNotifications(
        enabled=None,
        peer=await app.resolve_peer(chat_id),
    )
)