@@ -8,7 +8,7 @@ These accounts serve as an interface for code running somewhere on your server.
88
99#### Features
1010
11- - Full [ Telegram Bot API 4.7 ] ( https://core.telegram.org/bots/api ) support
11+ - Full [ Telegram Bot API 4.8 ] ( https://core.telegram.org/bots/api ) support
1212- [ Telegram Payment Platform] ( https://telegram.org/blog/payments )
1313- [ HTML5 Games] ( https://core.telegram.org/bots/api#games )
1414- [ Inline mode] ( https://core.telegram.org/bots/api#inline-mode )
@@ -33,7 +33,7 @@ $ yarn add telegraf
3333#### Example
3434
3535``` js
36- const Telegraf = require (' telegraf' )
36+ const { Telegraf } = require (' telegraf' )
3737
3838const bot = new Telegraf (process .env .BOT_TOKEN )
3939bot .start ((ctx ) => ctx .reply (' Welcome' ))
@@ -44,7 +44,7 @@ bot.launch()
4444```
4545
4646``` js
47- const Telegraf = require (' telegraf' )
47+ const { Telegraf } = require (' telegraf' )
4848
4949const bot = new Telegraf (process .env .BOT_TOKEN )
5050bot .command (' oldschool' , (ctx ) => ctx .reply (' Hello' ))
@@ -281,6 +281,7 @@ Context shortcuts for **message** update:
281281| ` stopPoll ` | [ ` telegram.stopPoll ` ] ( #stoppoll ) |
282282| ` unpinChatMessage ` | [ ` telegram.unpinChatMessage ` ] ( #unpinchatmessage ) |
283283| ` uploadStickerFile ` | [ ` telegram.uploadStickerFile ` ] ( #uploadstickerfile ) |
284+ | ` unbanChatMember ` | [ ` telegram.unbanChatMember ` ] ( #unbanchatmember ) |
284285
285286Context shortcuts for ** callback_query** update:
286287
@@ -332,6 +333,7 @@ Context shortcuts for **callback_query** update:
332333| ` stopPoll ` | [ ` telegram.stopPoll ` ] ( #stoppoll ) |
333334| ` unpinChatMessage ` | [ ` telegram.unpinChatMessage ` ] ( #unpinchatmessage ) |
334335| ` uploadStickerFile ` | [ ` telegram.uploadStickerFile ` ] ( #uploadstickerfile ) |
336+ | ` unbanChatMember ` | [ ` telegram.unbanChatMember ` ] ( #unbanchatmember ) |
335337
336338Context shortcuts for ** inline_query** update:
337339
@@ -552,7 +554,7 @@ require('https')
552554Express.js example integration
553555
554556``` js
555- const Telegraf = require (' telegraf' )
557+ const { Telegraf } = require (' telegraf' )
556558const express = require (' express' )
557559const expressApp = express ()
558560
@@ -572,7 +574,7 @@ expressApp.listen(3000, () => {
572574Fastify example integration
573575
574576``` js
575- const Telegraf = require (' telegraf' )
577+ const { Telegraf } = require (' telegraf' )
576578const fastifyApp = require (' fastify' )()
577579
578580const bot = new Telegraf (process .env .BOT_TOKEN )
@@ -591,7 +593,7 @@ fastifyApp.listen(3000, () => {
591593Koa.js example integration
592594
593595``` js
594- const Telegraf = require (' telegraf' )
596+ const { Telegraf } = require (' telegraf' )
595597const Koa = require (' koa' )
596598const koaBody = require (' koa-body' )
597599
@@ -660,7 +662,7 @@ bot.on('message', (ctx) => {
660662To enable Telegram Passport support you can use [ ` telegram-passport ` ] ( https://www.npmjs.com/package/telegram-passport ) package:
661663
662664``` js
663- const Telegraf = require (' telegraf' )
665+ const { Telegraf } = require (' telegraf' )
664666const TelegramPassport = require (' telegram-passport' )
665667
666668const bot = new Telegraf (process .env .BOT_TOKEN )
@@ -742,7 +744,7 @@ $ telegraf -t "bot token" bot.js
742744Telegraf API reference
743745
744746``` js
745- const Telegraf = require (' telegraf' )
747+ const { Telegraf } = require (' telegraf' )
746748```
747749
748750##### Constructor
@@ -2153,7 +2155,7 @@ Telegram markup helper, [see examples](https://github.com/telegraf/telegraf/tree
21532155Simple scene-based control flow middleware.
21542156
21552157``` js
2156- const Telegraf = require (' telegraf' )
2158+ const { Telegraf } = require (' telegraf' )
21572159const session = require (' telegraf/session' )
21582160const Stage = require (' telegraf/stage' )
21592161const Scene = require (' telegraf/scenes/base' )
0 commit comments