telegraf-ts
Well-Typed fork of telegraf
Last updated 24 days ago by frontendmonster .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install telegraf-ts 
SYNC missed versions from official npm registry.

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

Introduction

Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats. These accounts serve as an interface for code running somewhere on your server.

Features

Installation

$ npm install telegraf

or using yarn:

$ yarn add telegraf

Documentation

Telegraf developer docs

Examples

const { Telegraf } = require('telegraf')

const bot = new Telegraf(process.env.BOT_TOKEN)
bot.start((ctx) => ctx.reply('Welcome!'))
bot.help((ctx) => ctx.reply('Send me a sticker'))
bot.on('sticker', (ctx) => ctx.reply('????'))
bot.hears('hi', (ctx) => ctx.reply('Hey there'))
bot.launch()
const { Telegraf } = require('telegraf')

const bot = new Telegraf(process.env.BOT_TOKEN)
bot.command('oldschool', (ctx) => ctx.reply('Hello'))
bot.command('modern', ({ reply }) => reply('Yo'))
bot.command('hipster', Telegraf.reply('λ'))
bot.launch()

There's some cool examples too.

Current Tags

  • 3.88.5                                ...           latest (24 days ago)

7 Versions

  • 3.88.5                                ...           24 days ago
  • 3.88.4                                ...           24 days ago
  • 3.88.3                                ...           24 days ago
  • 3.88.2                                ...           24 days ago
  • 3.36.4                                ...           2 months ago
  • 3.36.3                                ...           2 months ago
  • 3.36.2                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 41
Dependencies (5)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |