0.0.4 • Published 9 years ago
telegraf-once v0.0.4

Telegraf-once
Wrapper for the original package Telegraf with the ability to subscribe to a single event
Installation
$ npm install telegraf-once --saveDocumentation
Example
const Telegraf = require('telegraf-once')
const app = new Telegraf(process.env.BOT_TOKEN)
app.command('start', (ctx) => {
console.log('start', ctx.from)
ctx.reply('Welcome!')
})
app.hears('hi', (ctx) => ctx.reply('Hey there!'))
app.on('sticker', (ctx) => ctx.reply('👍'))
app.startPolling()There's some cool examples.