fastify-telegraf
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

fastify-telegraf

NPM version NPM downloads JavaScript Style Guide Known Vulnerabilities

Fastify plugin to handle Telegraf's webhook with Typescript support

Install

npm i fastify-telegraf

// or

yarn add fastify-telegraf

Example

Given the following code:

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
})

Note

Use fastify-telegraf@1.0.1 for telegraf v3 (if there's problem)

License

Licensed under MIT

Package Sidebar

Install

npm i fastify-telegraf

Weekly Downloads

53

Version

1.0.2

License

MIT

Unpacked Size

8.69 kB

Total Files

12

Last publish

Collaborators

  • erfanium