telegraf-once
v0.0.4
Published
telegram-once
Downloads
4
Maintainers
Readme
Telegraf-once
Wrapper for the original package Telegraf with the ability to subscribe to a single event
Installation
$ npm install telegraf-once --save
Documentation
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.