Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/core/client.ts>createRawApi

The Telegram Bot Framework.
Very Popular
Latest
function createRawApi
import { createRawApi } from "https://deno.land/x/grammy@v1.30.1/core/client.ts";

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.

Parameters

token: string

The bot's token

optional
options: ApiClientOptions

A number of options to pass to the created API client

optional
webhookReplyEnvelope: WebhookReplyEnvelope

The webhook reply envelope that will be used