telegraf-botanio
v0.5.1
Published
Telegraf botanio middleware
Downloads
6
Maintainers
Readme
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()