messages.TogglePeerTranslations

class pyrogram.raw.functions.messages.TogglePeerTranslations

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

Details:
  • Layer: 227

  • 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
├── disabled → true (optional)
└── peer → InputPeer
├── InputPeerEmpty
├── InputPeerSelf
├── InputPeerChat
│ └── chat_id → long
├── InputPeerUser
│ ├── user_id → long
│ └── access_hash → long
│ ├── channel_id → long
│ └── access_hash → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_id → int
└── channel_id → long

Example

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