messages.ToggleSuggestedPostApproval

class pyrogram.raw.functions.messages.ToggleSuggestedPostApproval

Approve or reject a suggested post ».

Details:
  • Layer: 223

  • ID: 8107455C

Parameters:
  • peer (InputPeer) – Both for users and channels, must contain the ID of the direct messages monoforum » (for channels, the topic ID is extracted automatically from the msg_id).

  • msg_id (int 32-bit) – ID of the suggestion message.

  • reject (bool, optional) – Reject the suggested post.

  • schedule_date (int 32-bit, optional) – Custom scheduling date.

  • reject_comment (str, optional) – Optional comment for rejections (can only be used if reject is set).

Returns:

Updates

TL Schema

messages.toggleSuggestedPostApproval#8107455c
flags:#
reject:flags.1?true
peer:InputPeer
msg_id:int
schedule_date:flags.0?int
reject_comment:flags.2?string

= Updates

Parameter Tree

ToggleSuggestedPostApproval
├── rejecttrue (optional)
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── msg_idint
├── schedule_dateint (optional)
└── reject_commentstring (optional)

Example

await app.invoke(
    ToggleSuggestedPostApproval(
        reject=None,
        peer=await app.resolve_peer(chat_id),
        msg_id=0,
        schedule_date=0,
        reject_comment="text",
    )
)