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
| Name | Type | Required | Description |
|---|---|---|---|
Channel | InputChannelClass | yes | The channel where to toggle autotranslation. |
Enabled | bool | yes | Whether to enable or disable autotranslation. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.toggleAutotranslation#167fc0a1