0.0.1-alpha-4 • Published 4 years ago

protov v0.0.1-alpha-4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

ProtoV

Telegram Application with JavaScript.

Install

NPM:

npm install protov

Yarn:

yarn add protov

Basic Example

const ProtoV = require("protov");
const schema = require("protov-tl-schema");

const app = new ProtoV({
    layer: 113,
    schema: schema,
    main_dc_id: 2,
    api_id: 123456,
    api_hash: "",
    app_version: "0.1.0"
});

app.start().then(() => {
    console.log("started");
    
    app.invoke("help.getNearestDc")
       .then(NearestDc => console.log(NearestDc))
       .catch(e => console.error(e));
});