Socket
Book a DemoInstallSign in
Socket

@telegraf/client

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telegraf/client

Low-level library for performing Telegram Bot API calls

latest
Source
npmnpm
Version
0.7.1
Version published
Weekly downloads
18
-58.14%
Maintainers
4
Weekly downloads
 
Created
Source

@telegraf/client

Low-level library for performing Telegram Bot API calls.

Provides StreamFile for uploading arbitrary streams. Other objects with compatible interface (such as File provided by fetch-blob, undici, or formdata-node) should work as well.

const { File } = require("formdata-node");
const { Client } = require("@telegraf/client");

const document = new File(["42"], "answer.txt");
const client = new Client(process.env.BOT_TOKEN);

await client.call("sendDocument", { chat_id, document });

Keywords

telegram bot api client

FAQs

Package last updated on 26 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts