Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rojvv committed Aug 31, 2023
0 parents commit a137c7b
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: latest

- run: mdbook build

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
5 changes: 5 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[book]
authors = []
language = "en"
multilingual = false
src = "src"
5 changes: 5 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Summary

- [Introduction](./introduction.md)

<!-- - [Getting Started](./getting-started.md) -->
1 change: 1 addition & 0 deletions src/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Getting Started
37 changes: 37 additions & 0 deletions src/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Welcome to MTKruto

MTKruto is a library that lets you interact with the
[Telegram API](https://core.telegram.org/#telegram-api). It can be used from
JavaScript or TypeScript, and can run on Deno, browsers, and Node.js.

## The Telegram API vs. the Bot API

[Bot API](https://core.telegram.org/bots/api) is a high-level HTTP interface to
the Telegram API that makes it easy to develop bots and lets you focus on being
more productive. We highly recommend it if you’re planning to develop complex
bots.

On the other hand, the Telegram API is the main API for building Telegram
clients. It uses the [MTProto](https://core.telegram.org/mtproto) protocol which
makes it a little more difficult to consume than the Bot API. Telegram clients
can be a GUI application on an end user’s device, or a process running
continuously in a server.

While the Bot API can only be used to work with bot accounts, the Telegram API
can be used to work with both bot and user accounts. As mentioned previously,
the Bot API is simply an interface to work with bot accounts using the Telegram
API.

## When to Use the Telegram API

- If you want to bypass the limits of the main instance of the Bot API without
hosting your own instance (e.g., work with large files).
- If you want to develop your own Telegram app (e.g., alternative to
[Telegram Web](https://web.telegram.org/a)).
- If you want to automate user accounts.
- If you have your own reasons.

## Things to Consider

- You can’t interact with the Telegram API using webhooks. You have to maintain
a connection with Telegram servers.

0 comments on commit a137c7b

Please sign in to comment.