An open API service indexing awesome lists of open source software.

https://github.com/timnikolsky/tgkit

A developer-friendly wrapper for Telegram Bot API
https://github.com/timnikolsky/tgkit

bots nodejs telegram telegram-bot-api tgkit typescript

Last synced: 5 months ago
JSON representation

A developer-friendly wrapper for Telegram Bot API

Awesome Lists containing this project

README

          


TgKit Logo

TgKit



License


Telegram Bot API version

## About

> [!WARNING]
> **This library is under development!** It doesn't yet cover Telegram Bot API 100% and may contain bugs. Library API may change at any time. Use it in production at your own risk.
> **None of the code is generated**. Every type and structure is hand-written, hence there can be some mistakes. Please open an issue if you find any!

TgKit is library for interacting with [Telegram Bot API](https://core.telegram.org/bots/api)

### Features

- Lightweight
- Object-oriented, has predictable abstractions and [Typescript](https://typescriptlang.org/) type defentitions included

## Example

```ts
import { Client } from 'tgkit';

const client = new Client({
// Create bot and get token via @botfather
token: '0123456789:PUtY0uR0WNT37egR4m8oTtOk3NHer3-tMnK',
});

client.on('message', async (message) => {
if (message.text.startsWith('/start')) {
await message.chat.sendMessage("Hello World! I'm a brand new TgKit bot");
await message.chat.sendMessage('✌️');
}
});

client.polling.start();
```