channels.RestrictSponsoredMessages
- class pyrogram.raw.functions.channels.RestrictSponsoredMessages
Disable ads on the specified channel, for all users.
- Details:
Layer:
223ID:
9AE91519
- Parameters:
channel (
InputChannel) – The channel.restricted (
bool) – Whether to disable or re-enable ads.
- Returns:
TL Schema
channels.restrictSponsoredMessages#9ae91519
channel:InputChannel
restricted:Bool
= Updates
Parameter Tree
RestrictSponsoredMessages
├── channel →
InputChannel│ ├──
InputChannelEmpty│ ├──
InputChannel│ │ ├── channel_id →
long│ │ └── access_hash →
long│ └──
InputChannelFromMessage│ ├── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ ├── msg_id →
int│ └── channel_id →
long└── restricted →
BoolExample
await app.invoke(
RestrictSponsoredMessages(
channel=await app.resolve_channel(chat_id),
restricted=True,
)
)