@@ -5,14 +5,13 @@ Ruby wrapper for [Telegram's Bot API](https://core.telegram.org/bots/api).
55[ ![ Gem Version] ( https://badge.fury.io/rb/telegram-bot-ruby.svg )] ( http://badge.fury.io/rb/telegram-bot-ruby )
66[ ![ Build Status] ( https://github.com/atipugin/telegram-bot-ruby/actions/workflows/ci.yml/badge.svg )] ( https://github.com/atipugin/telegram-bot-ruby/actions )
77[ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/7e61fbf5bec86e118fb1/maintainability )] ( https://codeclimate.com/github/atipugin/telegram-bot-ruby/maintainability )
8- [ ![ Say Thanks!] ( https://img.shields.io/badge/Say%20Thanks!-🦉-1EAEDB.svg )] ( https://saythanks.io/to/atipugin )
98
109## Installation
1110
1211Add following line to your Gemfile:
1312
1413``` ruby
15- gem ' telegram-bot-ruby' , ' ~> 2.5 '
14+ gem ' telegram-bot-ruby' , ' ~> 2.7 '
1615```
1716
1817And then execute:
@@ -200,11 +199,9 @@ bot.listen do |message|
200199end
201200```
202201
203- Now, with ` inline ` mode enabled, your ` message ` object can be an instance of
204- [ Message] ( https://core.telegram.org/bots/api#message ) ,
205- [ InlineQuery] ( https://core.telegram.org/bots/api#inlinequery ) or
206- [ ChosenInlineResult] ( https://core.telegram.org/bots/api#choseninlineresult ) .
207- That's why you need to check type of each message and decide how to handle it.
202+ Now, with ` inline ` mode enabled, your ` message ` object can be an instance of any
203+ [ update type] ( https://core.telegram.org/bots/api#update ) supported by the Bot API.
204+ That's why you need to check the type of each message and decide how to handle it.
208205
209206Using ` answer_inline_query ` you can send query results to user.
210207` results ` field must be an array of [ query result objects] ( https://core.telegram.org/bots/api#inlinequeryresult ) .
@@ -225,7 +222,7 @@ bot.listen do |message|
225222 case message.text
226223 when ' /photo'
227224 path_to_photo = File .expand_path(' ~/Desktop/jennifer.jpg' )
228- bot.api.send_photo(chat_id: message.chat.id, photo: Faraday ::UploadIO .new (path_to_photo, ' image/jpeg' ))
225+ bot.api.send_photo(chat_id: message.chat.id, photo: Faraday ::Multipart :: FilePart .new (path_to_photo, ' image/jpeg' ))
229226 end
230227end
231228```
247244
248245## Connection adapters
249246
250- Since version ` 0.5.0 ` we rely on [ faraday] ( https://github.com/lostisland/faraday ) under the hood.
247+ We rely on [ faraday] ( https://github.com/lostisland/faraday ) under the hood.
251248You can use any of supported adapters (for example, ` net/http/persistent ` ):
252249
253250``` ruby
0 commit comments