This package has been deprecated

Author message:

Merged into telegraf@v5

@telegraf/client
TypeScript icon, indicating that this package has built-in type declarations

0.7.1 • Public • Published

@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 });

Package Sidebar

Install

npm i @telegraf/client

Weekly Downloads

1

Version

0.7.1

License

MIT

Unpacked Size

18.8 kB

Total Files

23

Last publish

Collaborators

  • ejnshtein
  • mkrhere
  • telegraf-owner
  • wojpawlik