tg-bot-api
Init
import { TelegramBotApi } from '@wagwan/tg-bot-api';
const api = new TelegramBotApi({
token: 'secret',
request: axios.create(),
handleError: (error: unknown) => { throw new TelegramBotApiError({ error }) },
});
Supported methods (WIP)
- getMe (tg api docs)
- getUpdates (tg api docs)
- setWebhook (tg api docs)
- deleteWebhook (tg api docs)
- getWebhookInfo (tg api docs)
- sendMessage (tg api docs)
- sendDocument (tg api docs)
- setMyCommands (tg api docs)
- deleteMyCommands (tg api docs)
- getMyCommands (tg api docs)