Sem descrição

YouTwitFace 245ecef3ac Prepare for publishing on npm há 5 anos atrás
.idea 7703853511 start implmenting network classes há 5 anos atrás
browser a9d93bb480 add some examples há 5 anos atrás
examples 8a2fcc5803 update example to use precompiled library há 5 anos atrás
gramjs a9d93bb480 add some examples há 5 anos atrás
gramjs_generator 48ff535d99 Fix types with no args há 5 anos atrás
.bablerc f15965e516 add w3cwebsockets support for browsers há 5 anos atrás
.eslintignore 30ac1fa55e Port code to browser compatible há 5 anos atrás
.eslintrc.json 0dd66c4303 Remove semicolons há 5 anos atrás
.gitignore a9d93bb480 add some examples há 5 anos atrás
.npmignore a7b7bf436e Prepare for publishing on npm há 5 anos atrás
LICENSE 272930d0c7 Create LICENSE há 5 anos atrás
README.md e317715ddd Create README.md há 5 anos atrás
index.js 0dd66c4303 Remove semicolons há 5 anos atrás
package-lock.json a7b7bf436e Prepare for publishing on npm há 5 anos atrás
package.json a7b7bf436e Prepare for publishing on npm há 5 anos atrás
webpack.config.babel.js e9284eb057 add browser distribution file há 5 anos atrás

README.md

GramJS

GramJS is Telegram client implementation in Javascript. This project's core is completely based on Telethon. All the files which are fully based on it. don't forget to have a look to the original project.

Obtaining your API ID and Hash

  1. Follow this link and login with your phone number.
  2. Click under API Development tools.
  3. A Create new application window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can be changed later as long as I'm aware.
  4. Click on Create application at the end. Now that you have the API ID and Hash, head to api/ directory and create a copy of the settings_example file, naming it settings (lowercase!). Then fill the file with the corresponding values (your api_id, api_hash and phone number in international format).

Running GramJS

First of all, you need to run the index.js by issuing node index.js gen. This will generate all the TLObjects from the given scheme.tl file. When it's done, you can run node examples/main.js to start the interactive example.

Using raw api

Currently you can use any raw api function using await client.invoke(new RequestClass(args)) . you can find all the requests and types at https://gram.js.org/