channels.ToggleAutotranslation

class pyrogram.raw.functions.channels.ToggleAutotranslation

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

Details:
  • Layer: 223

  • ID: 167FC0A1

Parameters:
  • channel (InputChannel) – The channel where to toggle autotranslation.

  • enabled (bool) – Whether to enable or disable autotranslation.

Returns:

Updates

TL Schema

channels.toggleAutotranslation#167fc0a1
channel:InputChannel
enabled:Bool

= Updates

Parameter Tree

ToggleAutotranslation
├── channelInputChannel
│ ├── InputChannelEmpty
│ ├── InputChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
└── enabledBool

Example

await app.invoke(
    ToggleAutotranslation(
        channel=await app.resolve_channel(chat_id),
        enabled=True,
    )
)