channels.ToggleAntiSpam
- class pyrogram.raw.functions.channels.ToggleAntiSpam
Enable or disable the native antispam system.
- Details:
Layer:
223ID:
68F3E4EB
- Parameters:
channel (
InputChannel) – Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters.enabled (
bool) – Enable or disable the native antispam system.
- Returns:
TL Schema
channels.toggleAntiSpam#68f3e4eb
channel:InputChannel
enabled:Bool
= Updates
Parameter Tree
ToggleAntiSpam
├── 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└── enabled →
BoolExample
await app.invoke(
ToggleAntiSpam(
channel=await app.resolve_channel(chat_id),
enabled=True,
)
)