GithubHelp home page GithubHelp logo

fzlrhmn / telegraf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from telegraf/telegraf

0.0 2.0 0.0 621 KB

๐Ÿ“ก Modern Telegram bot framework

Home Page: http://telegraf.js.org

License: MIT License

JavaScript 100.00%

telegraf's Introduction

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

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 --save

Telegram token

To use the Telegram Bot API, you first have to get a bot account by chatting with BotFather.

BotFather will give you a token, something like 123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ. With the token you can start developing your bot.

Quick start

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

Documentation

Telegraf developer docs

Example

const Telegraf = require('telegraf')

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.

telegraf's People

Contributors

dotcypress avatar greenkeeperio-bot avatar mcrunix avatar runegan avatar denisx avatar

Watchers

James Cloos avatar Faisal Rahman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.