fastify-telegraf:固定插件以处理Telegraf Webhook

时间:2021-04-09 19:54:46
【文件属性】:
文件名称:fastify-telegraf:固定插件以处理Telegraf Webhook
文件大小:7KB
文件格式:ZIP
更新时间:2021-04-09 19:54:46
plugin node telegram webhook telegraf 固定远距离移植 插件通过Typescript支持处理webhook,支持fastify 4.xx 安装 npm i fastify-telegraf // or yarn add fastify-telegraf 例子 给出以下代码: 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 ,
【文件预览】:
fastify-telegraf-main
----.eslintrc(28B)
----example()
--------index.js(744B)
----fastify-telegraf.js(318B)
----package.json(2KB)
----fastify-telegraf.d.ts(289B)
----.github()
--------workflows()
----test()
--------integration.test.js(2KB)
----LICENSE(1KB)
----.taprc(58B)
----fastify-telegraf.test-d.ts(273B)
----.gitignore(693B)
----README.md(1KB)
----.editorconfig(160B)

网友评论