mithra

0.1.6 • Public • Published

Telegraf Bot API Version NPM Version node bitHound Build Status js-standard-style

This is a fork of Telegraf with added express capabilities to WebHooks

Installation

$ npm install mithra --save

Quick start

Step-by-step instructions for building and deploying basic bot with 🤖 micro-bot (Telegraf high level wrapper).

Original Documentation

Telegraf developer docs

Example

const Mithra = require('mithra')

const app = new Mithra(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.

Package Sidebar

Install

npm i mithra

Weekly Downloads

0

Version

0.1.6

License

MIT

Last publish

Collaborators

  • mithratalluri