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: 227

  • 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
├── enabled → true (optional)
└── peer → InputPeer
├── InputPeerEmpty
├── InputPeerSelf
├── InputPeerChat
│ └── chat_id → long
├── InputPeerUser
│ ├── user_id → long
│ └── access_hash → long
│ ├── channel_id → long
│ └── access_hash → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_id → int
└── channel_id → long

Example

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