Skip to content
forked from telegraf/telegraf

Modern Telegram Bot Framework for Node.js

License

Notifications You must be signed in to change notification settings

Siloss/telegraf

This branch is 531 commits behind telegraf/telegraf:v4.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

66b795a · Jul 18, 2020
Jul 3, 2020
Dec 25, 2019
Jun 24, 2020
Jul 9, 2020
Jul 4, 2020
Jul 18, 2020
Apr 16, 2016
Oct 16, 2019
Jul 8, 2020
Jul 3, 2020
Apr 20, 2020
Apr 21, 2020
Jul 4, 2020
Aug 9, 2019
Jan 11, 2019
Jan 11, 2019
Jul 8, 2020
Apr 30, 2020
Jul 3, 2020

Repository files navigation

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

Resources

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.

About

Modern Telegram Bot Framework for Node.js

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 61.2%
  • JavaScript 38.8%