Telegram bots

20
Telegram Bots Applications for telegram
  • Upload

    -
  • Category

    Internet

  • view

    158
  • download

    0

Transcript of Telegram bots

Page 1: Telegram bots

Telegram BotsApplications for telegram

Page 2: Telegram bots

An introduction for developers

An Introduction1.

Page 3: Telegram bots

What can I do with bots?

◎ Get customized notifications and news Yandex, Forbes Bot, TechCrunch Bot◎ Integrate with other services Wiki Bot, Music Bot, Youtube Bot, Github Bot …◎ Create custom tools Markdown bot, Sticker bot, Vote bot, Like bot◎ Single- and multiplayer games Travia Bot◎ Social services HotOrBot◎ Do virtually anything else * * Except for dishes — bots are terrible at doing the dishes.

More examples

Page 4: Telegram bots

Bots more powerful than humans

Bot perks2.

Page 5: Telegram bots

How user interact with bots?

◎ Send messages and commands to opened chats bots by opening a chat with them.

Page 6: Telegram bots

Commands

/command [optional] [argument]

Page 7: Telegram bots

Keyboards

Page 8: Telegram bots

Inline keyboards and on-the-fly updating

Don’t send messages to chat.

Page 9: Telegram bots

How user interact with bots?

◎ Send requests directly from the input field by typing the bot's @username and a query.

◎ Send requests directly from the input field by typing the bot's @username and a query.

Page 10: Telegram bots

Inline mode

Page 11: Telegram bots

Location and Number

Page 12: Telegram bots

Privacy mode

A bot running in privacy mode will not receive all messages that people send to the group. Instead, it will only receive:

◎ Messages that start with a slash ‘/’ (see Commands above)◎ Replies to the bot's own messages◎ Service messages (people added or removed from the group, etc.)

Page 13: Telegram bots

an HTTP-based interface created for developers

Telegram Bot API3.

Page 14: Telegram bots

How to create bot?

There's a… bot for that.

Just talk to BotFather.

Page 15: Telegram bots

Making requests

token: 255351772:AAGWW5SJ7766--JXUYpOz0rJnp0KjFj7GY0

https://api.telegram.org/bot<token>/METHOD_NAME

Examples: 1. getMe2. getUpdates (https://telegram.me/itgm_development_bot)3. getUpdates with long polling

Page 16: Telegram bots

Available types

◎ User◎ Chat◎ Message◎ MessageEntity◎ PhotoSize◎ Audio ◎ Document ◎ Sticker◎ Video◎ Voice

Read more …

◎ Contact◎ Location◎ Venue (location + address)◎ UserProfilesPhotos◎ File◎ ReplyKeyboardMarkup◎ KeyboardButton◎ ReplyKeyboardHide◎ InlineKeyboardMarkup ◎ InlineKeyboardButton …

Page 17: Telegram bots

ITGM BotLet’s code4.

Page 18: Telegram bots

Deploy5.Containerize and deploy to Digital Ocean

Page 19: Telegram bots

Все равно надо задеплоить!

Деплоить

Page 20: Telegram bots

Thank you!

Any questions?

You can find me at:@[email protected]