5.0.0 • Published 3 years ago

telegraff v5.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

Attention

Official Telegraf.js is "dead" after 4.0.0 release. This is a fork of version 3.38 which will continue to support new versions of the Telegram Bot API

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 telegraff

or using yarn:

$ yarn add telegraff

Documentation

Telegraf developer docs

Examples

const { Telegraf } = require('telegraff')

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('telegraff')

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.

5.0.0

3 years ago

3.40.0

3 years ago

3.38.0

3 years ago

3.39.1

3 years ago

3.39.2

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.3.31

3 years ago

1.3.32

3 years ago

1.3.21

3 years ago

1.3.22

3 years ago

1.2.9

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.41

3 years ago

1.2.42

3 years ago

1.2.43

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

4 years ago