https://github.com/erfanium/fastify-telegraf
Fastify plugin to handle Telegraf webhook
https://github.com/erfanium/fastify-telegraf
fastify node plugin telegraf telegram webhook
Last synced: about 1 month ago
JSON representation
Fastify plugin to handle Telegraf webhook
- Host: GitHub
- URL: https://github.com/erfanium/fastify-telegraf
- Owner: erfanium
- License: mit
- Created: 2020-10-26T16:23:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-09T11:54:56.000Z (about 4 years ago)
- Last Synced: 2025-04-13T02:38:46.407Z (about 1 month ago)
- Topics: fastify, node, plugin, telegraf, telegram, webhook
- Language: JavaScript
- Homepage:
- Size: 162 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastify-telegraf
[](https://www.npmjs.com/package/fastify-telegraf)
[](https://www.npmjs.com/package/fastify-telegraf)
[](https://standardjs.com)
[](https://snyk.io/test/github/erfanium/fastify-telegraf)[Fastify](https://github.com/fastify/fastify) plugin to handle [Telegraf's](https://github.com/telegraf/telegraf) webhook with Typescript support, supports fastify 4.x.x
## Install
```sh
npm i fastify-telegraf// or
yarn add fastify-telegraf
```## Example
Given the following code:
```js
const fastify = require('fastify')()
const { Telegraf } = require('telegraf')
const telegrafPlugin = require('fastify-telegraf')const bot = new Telegraf(BOT_TOKEN)
fastify.register(telegrafPlugin, { bot, path: '/my-secret-path' })
fastify.listen(8000, (err) => {
if (err) throw err
})
```## Fastify 3.x.x compatibility
Use [email protected]## License
Licensed under [MIT](./LICENSE)