Skip to main content
Module

x/grammy/core/client.ts

The Telegram Bot Framework.
Extremely Popular
Go to Latest
import * as grammy from "https://deno.land/x/grammy@v1.12.0/core/client.ts";

Functions

Creates a new transformable API, i.e. an object that lets you perform raw API calls to the Telegram Bot API server but pass the calls through a stack of transformers before. This will create a new API client instance under the hood that will be used to connect to the Telegram servers. You therefore need to pass the bot token. In addition, you may pass API client options as well as a webhook reply envelope that allows the client to perform up to one HTTP request in response to a webhook call if this is desired.

Interfaces

Options to pass to the API client that eventually connects to the Telegram Bot API server and makes the HTTP requests.

A transformable API enhances the RawApi type by transformers.

Small utility interface that abstracts from webhook reply calls of different web frameworks.

Type Aliases

Type of a function that can perform an API call. Used for Transformers.

Represents the raw Telegram Bot API with all methods specified 1:1 as documented on the website (https://core.telegram.org/bots/api).

API call transformers are functions that can access and modify the method and payload of an API call on the fly. This can be useful if you want to implement rate limiting or other things against the Telegram Bot API.