if($msg == '/leave all'){ $dialogs = $this->get_dialogs(); foreach ($dialogs as $peer) { $type = $MadelineProto->get_info($peer); $type3 = $type['type']; if($type3 == 'channel'){ $MadelineProto->channels->leaveChannel([ 'channel' => $peer ]); } }...