messages.TogglePeerTranslations

class pyrogram.raw.functions.messages.TogglePeerTranslations

Show or hide the real-time chat translation popup for a certain chat

Details:
  • Layer: 223

  • ID: E47CB579

Parameters:
  • peer (InputPeer) – The peer

  • disabled (bool, optional) – Whether to disable or enable the real-time chat translation popup

Returns:

bool

TL Schema

messages.togglePeerTranslations#e47cb579
flags:#
disabled:flags.0?true
peer:InputPeer

= Bool

Parameter Tree

TogglePeerTranslations
├── disabledtrue (optional)
└── peerInputPeer
├── InputPeerEmpty
├── InputPeerSelf
├── InputPeerChat
│ └── chat_idlong
├── InputPeerUser
│ ├── user_idlong
│ └── access_hashlong
│ ├── channel_idlong
│ └── access_hashlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_idint
└── channel_idlong

Example

await app.invoke(
    TogglePeerTranslations(
        disabled=None,
        peer=await app.resolve_peer(chat_id),
    )
)