telegraf-botanio

0.5.1 • Public • Published

Botanio middleware for Telegraf

Botanio middleware for Telegraf (Telegram bot framework)

Installation

$ npm install telegraf-botanio

Example

const Telegraf = require('telegraf')
const TelegrafBotanio = require('../lib/botanio')
 
const bot = new Telegraf(process.env.BOT_TOKEN)
const botanio = new TelegrafBotanio(process.env.BOTANIO_TOKEN)
 
bot.use(botanio.middleware())
 
bot.command('start', (ctx) => {
  ctx.botanio.track('start')
  return ctx.reply('Hi there!')
})
 
bot.startPolling()

Package Sidebar

Install

npm i telegraf-botanio

Weekly Downloads

4

Version

0.5.1

License

none

Last publish

Collaborators

  • alepop