Link Search Menu Expand Document

Method: messages.togglePeerTranslations

Back to methods index

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


disabledBoolWhether to disable or enable the real-time chat translation popupOptional
peerUsername, chat ID, Update, Message or InputPeerThe peerOptional

Return type: Bool

Can bots use this method: YES

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$Bool = $MadelineProto->messages->togglePeerTranslations(disabled: $Bool, peer: $InputPeer, );