Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
/ client Public archive

Low-level library for performing Telegram Bot API calls.

License

Notifications You must be signed in to change notification settings

telegraf/client

Repository files navigation

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

About

Low-level library for performing Telegram Bot API calls.

Resources

License

Stars

Watchers

Forks

Packages

No packages published