Layer 220
method Users
channels.toggleAntiSpam#68f3e4eb channel:InputChannel enabled:Bool = Updates;

Parameters

Name Type Description
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

Updates

Possible Errors

Code Type Description
400 CHANNEL_INVALID The provided channel is invalid.
400 CHAT_NOT_MODIFIED No changes were made to chat information because the new information you passed is identical to the current information.

Gogram Example

// ChannelsToggleAntiSpam - positional arguments
result, err := client.ChannelsToggleAntiSpam(&tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, true)
if err != nil {
    // handle error
}
// result is *tg.Updates