【文件属性】:
文件名称:telegraf-query-parser:用于telegraf.js的查询解析器中间件(http
文件大小:3KB
文件格式:ZIP
更新时间:2021-04-30 17:39:12
JavaScript
用于Telegraf的查询解析器中间件
安装
$ npm install telegraf - query - parser
例子
const Telegraf = require ( 'telegraf' )
const bot = new Telegraf ( process . env . BOT_TOKEN )
bot . use ( require ( 'telegraf-query-parser' ) )
// When user sends */start?id=13881466*
bot . start ( ctx => {
console . log ( ctx . query ) // returns { 'id': '13881466' }
ctx . reply ( `You were invited by user ${ ctx . query . id
【文件预览】:
telegraf-query-parser-master
----.gitignore(33B)
----LICENSE(1KB)
----package.json(565B)
----readme.md(520B)
----index.js(478B)
----.npmignore(33B)