0.5.1 • Published 7 years ago

telegraf-botanio v0.5.1

Weekly downloads
17
License
-
Repository
github
Last release
7 years ago

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