0.0.4 • Published 10 months ago
tgrm v0.0.4
tgrm
A minimal Telegram Bot API client
Usage
import { createClient, buildFormDataFor } from "tgrm";
const client = createClient({ token: "my-token" });
const message = await client.request("sendMessage", {
chat_id: 123456789,
text: "Hello, world!",
});
if (message.ok) {
// Send a file!
await client.request(
"sendDocument",
buildFormDataFor<"sendDocument">({
chat_id: 123456789,
reply_to_message_id: message.result.message_id,
document: new File(["hello, world!"], "hello.txt"),
})
);
}
0.0.4
10 months ago
0.0.3
12 months ago
0.0.1
2 years ago
0.0.2
2 years ago
0.0.1-next.0
2 years ago
0.0.1-next.1
2 years ago
0.0.0
2 years ago