messages.ToggleSuggestedPostApproval
- class pyrogram.raw.functions.messages.ToggleSuggestedPostApproval
Approve or reject a suggested post ».
- Details:
Layer:
223ID:
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 (
int32-bit) – ID of the suggestion message.reject (
bool, optional) – Reject the suggested post.schedule_date (
int32-bit, optional) – Custom scheduling date.reject_comment (
str, optional) – Optional comment for rejections (can only be used if reject is set).
- Returns:
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
├── reject →
true (optional)├── peer →
InputPeer│ ├──
InputPeerEmpty│ ├──
InputPeerSelf│ ├──
InputPeerChat│ │ └── chat_id →
long│ ├──
InputPeerUser│ │ ├── user_id →
long│ │ └── access_hash →
long│ ├──
InputPeerChannel│ │ ├── channel_id →
long│ │ └── access_hash →
long│ ├──
InputPeerUserFromMessage│ │ ├── peer →
InputPeer│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ ├──
InputPeerChannel│ │ │ ├──
InputPeerUserFromMessage│ │ │ └──
InputPeerChannelFromMessage│ │ ├── msg_id →
int│ │ └── user_id →
long│ ├── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ ├── msg_id →
int│ └── channel_id →
long├── msg_id →
int├── schedule_date →
int (optional)└── reject_comment →
string (optional)Example
await app.invoke(
ToggleSuggestedPostApproval(
reject=None,
peer=await app.resolve_peer(chat_id),
msg_id=0,
schedule_date=0,
reject_comment="text",
)
)