https://github.com/tbxark/telegram-router
A simple javascript library that helps you to route messages from telegram bot to your application.
https://github.com/tbxark/telegram-router
router telegram telegram-bot telegram-bot-app
Last synced: 4 months ago
JSON representation
A simple javascript library that helps you to route messages from telegram bot to your application.
- Host: GitHub
- URL: https://github.com/tbxark/telegram-router
- Owner: TBXark
- License: mit
- Created: 2024-08-31T09:03:27.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-09-11T02:11:43.000Z (10 months ago)
- Last Synced: 2025-10-08T09:52:58.118Z (9 months ago)
- Topics: router, telegram, telegram-bot, telegram-bot-app
- Language: TypeScript
- Homepage:
- Size: 413 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telegram-router
`telegram-router` is a simple javascript library that helps you to route messages from telegram bot to your application.
## Installation
```bash
npm install telegram-router
```
## Usage
```typescript
import { TelegramRouter } from 'telegram-router'
const bot = new TelegramRouter();
bot.handleWith('/admin', UpdateType.Message, MatchType.Exact, async (update: Telegram.Update) => {
// handle message
});
bot.fetch(update);
```
## Example
- [telegram-bot-workers-template](https://github.com/TBXark/telegram-bot-workers-template): The basic template for running a Telegram Bot on Cloudflare Workers.
## License
**telegram-router** is released under the MIT license. [See LICENSE](LICENSE) for details.