Skip to content

Latest commit

 

History

History
36 lines (19 loc) · 750 Bytes

README.md

File metadata and controls

36 lines (19 loc) · 750 Bytes

telegram-router

telegram-router is a simple javascript library that helps you to route messages from telegram bot to your application.

Installation

npm install telegram-router

Usage

import { TelegramRouter } from 'telegram-router'

const bot = new TelegramRouter<Response>();

bot.handleWith('/admin', UpdateType.Message, MatchType.Exact, async (update: Telegram.Update) => {
    // handle message
});

bot.fetch(update);

Example

License

telegram-router is released under the MIT license. See LICENSE for details.