Layer 224
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

Gogram Example

// ChannelsToggleAntiSpam - positional arguments
result, err := client.ChannelsToggleAntiSpam(&tg.InputChannel{ChannelID: int64(1234567890), AccessHash: int64(5678901234567890)}, true)
if err != nil {
    // handle error
}
// result is *tg.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.