Skip to main content

channels.toggleAutotranslation

Toggle autotranslation in a channel, for all users: see here » for more info.

func (c *Client) ChannelsToggleAutotranslation(ctx context.Context, request *ChannelsToggleAutotranslationRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.ChannelsToggleAutotranslation(ctx, &tg.ChannelsToggleAutotranslationRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
ChannelInputChannelClassyesThe channel where to toggle autotranslation.
EnabledboolyesWhether to enable or disable autotranslation.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.

References