1.1.6 • Published 6 years ago

telegraf-query-parser v1.1.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Query parser middleware for Telegraf

Installation

$ npm install telegraf-query-parser

Example

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

bot.startPolling() 

//TODO: Write examples of using query parser with inline keyboard

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago