telegram-bot-ruby 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 357f5a74cde39f07315db2cd4235600f5e67a2aaa3fed93a8ad9d9fe87be3710
4
- data.tar.gz: 041b6041f45a36d8a8e976f251449c5c70bfbf045c89e9c359955bcc45d08c45
3
+ metadata.gz: 147ce110bf7814bf274a349a690e50c3c765d21465de7a705e828751f8467f23
4
+ data.tar.gz: beaf1f9e171e3da2e57ec678a39732a715938542401369ab879d3ee4f6c0c310
5
5
  SHA512:
6
- metadata.gz: d248ef2b807c9d9a8b5192e10daf9c4bbbb881ca62caecf29189714636d264f9e2f0ef49533bf6e60eb26406e05ed1b6766dab99303e3595fdf1febe3000428f
7
- data.tar.gz: 7974d0f32a1b1d4560db47212097358ddba3d5a2d13f2e596d9dff88e9aa3a0c3e1249574e4df5b3217da77a8a529a04bdf266e63d9f0285636bbd0327711809
6
+ metadata.gz: c877eedeec06700c6691d569ba6ec01891274b661e6a3d40455c16492ef3486c26b3abe3c44de1857fb444c64aad651d792c6de1f2dda3c3299c77b11cd64955
7
+ data.tar.gz: cccdc34911f698b2069d6e0a6221d2e80cbecc5df947b19b7f204670bdfd59b6e6870dd52b5695a53f2baa916eca3b3719251db7c3812a8521f2512e2b1ee40b
@@ -13,7 +13,8 @@ jobs:
13
13
  matrix:
14
14
  ruby:
15
15
  - 2.7
16
- - 3.2
16
+ - 3.4
17
+ - 4.0
17
18
  steps:
18
19
  - name: Checkout
19
20
  uses: actions/checkout@v3
@@ -31,7 +32,8 @@ jobs:
31
32
  matrix:
32
33
  ruby:
33
34
  - 2.7
34
- - 3.2
35
+ - 3.4
36
+ - 4.0
35
37
  steps:
36
38
  - name: Checkout
37
39
  uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.7.0
4
+
5
+ ### Added
6
+
7
+ - [Bot API 9.6](https://core.telegram.org/bots/api-changelog#april-3-2026) [#335](https://github.com/atipugin/telegram-bot-ruby/pull/335)
8
+
3
9
  ## 2.6.0
4
10
 
5
11
  ### Added
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ gem 'pry'
10
10
  gem 'rake', '~> 13.0'
11
11
 
12
12
  gem 'rspec', '~> 3.4'
13
- gem 'vcr', '~> 6.0'
13
+ gem 'vcr', '~> 6.4'
14
14
 
15
15
  gem 'rubocop', '~> 1.66.1'
16
16
  gem 'rubocop-performance', '~> 1.18'
@@ -85,6 +85,8 @@ module Telegram
85
85
  'answerCallbackQuery' => Types::Bool,
86
86
  'getUserChatBoosts' => Types::UserChatBoosts,
87
87
  'getBusinessConnection' => Types::BusinessConnection,
88
+ 'getManagedBotToken' => Types::String,
89
+ 'replaceManagedBotToken' => Types::String,
88
90
  'setMyCommands' => Types::Bool,
89
91
  'deleteMyCommands' => Types::Bool,
90
92
  'getMyCommands' => Types::Array.of(Types::BotCommand),
@@ -127,6 +129,9 @@ module Telegram
127
129
  'repostStory' => Types::Story,
128
130
  'editStory' => Types::Story,
129
131
  'deleteStory' => Types::Bool,
132
+ 'answerWebAppQuery' => Types::SentWebAppMessage,
133
+ 'savePreparedInlineMessage' => Types::PreparedInlineMessage,
134
+ 'savePreparedKeyboardButton' => Types::PreparedKeyboardButton,
130
135
  'editMessageText' => Types::Message | Types::Bool,
131
136
  'editMessageCaption' => Types::Message | Types::Bool,
132
137
  'editMessageMedia' => Types::Message | Types::Bool,
@@ -156,8 +161,6 @@ module Telegram
156
161
  'setCustomEmojiStickerSetThumbnail' => Types::Bool,
157
162
  'deleteStickerSet' => Types::Bool,
158
163
  'answerInlineQuery' => Types::Bool,
159
- 'answerWebAppQuery' => Types::SentWebAppMessage,
160
- 'savePreparedInlineMessage' => Types::PreparedInlineMessage,
161
164
  'sendInvoice' => Types::Message,
162
165
  'createInvoiceLink' => Types::String,
163
166
  'answerShippingQuery' => Types::Bool,
@@ -9,6 +9,7 @@ module Telegram
9
9
  attribute? :style, Types::String
10
10
  attribute? :request_users, KeyboardButtonRequestUsers
11
11
  attribute? :request_chat, KeyboardButtonRequestChat
12
+ attribute? :request_managed_bot, KeyboardButtonRequestManagedBot
12
13
  attribute? :request_contact, Types::Bool
13
14
  attribute? :request_location, Types::Bool
14
15
  attribute? :request_poll, KeyboardButtonPollType
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class KeyboardButtonRequestManagedBot < Base
7
+ attribute :request_id, Types::Integer
8
+ attribute? :suggested_name, Types::String
9
+ attribute? :suggested_username, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class ManagedBotCreated < Base
7
+ attribute :bot, User
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class ManagedBotUpdated < Base
7
+ attribute :user, User
8
+ attribute :bot, User
9
+ end
10
+ end
11
+ end
12
+ end
@@ -23,6 +23,7 @@ module Telegram
23
23
  attribute? :quote, TextQuote
24
24
  attribute? :reply_to_story, Story
25
25
  attribute? :reply_to_checklist_task_id, Types::Integer
26
+ attribute? :reply_to_poll_option_id, Types::String
26
27
  attribute? :via_bot, User
27
28
  attribute? :edit_date, Types::Integer
28
29
  attribute? :has_protected_content, Types::True
@@ -98,7 +99,10 @@ module Telegram
98
99
  attribute? :giveaway, Giveaway
99
100
  attribute? :giveaway_winners, GiveawayWinners
100
101
  attribute? :giveaway_completed, GiveawayCompleted
102
+ attribute? :managed_bot_created, ManagedBotCreated
101
103
  attribute? :paid_message_price_changed, PaidMessagePriceChanged
104
+ attribute? :poll_option_added, PollOptionAdded
105
+ attribute? :poll_option_deleted, PollOptionDeleted
102
106
  attribute? :suggested_post_approved, SuggestedPostApproved
103
107
  attribute? :suggested_post_approval_failed, SuggestedPostApprovalFailed
104
108
  attribute? :suggested_post_declined, SuggestedPostDeclined
@@ -13,11 +13,14 @@ module Telegram
13
13
  attribute :is_anonymous, Types::Bool
14
14
  attribute :type, Types::String
15
15
  attribute :allows_multiple_answers, Types::Bool
16
- attribute? :correct_option_id, Types::Integer
16
+ attribute :allows_revoting, Types::Bool
17
+ attribute? :correct_option_ids, Types::Array.of(Types::Integer)
17
18
  attribute? :explanation, Types::String
18
19
  attribute? :explanation_entities, Types::Array.of(MessageEntity)
19
20
  attribute? :open_period, Types::Integer
20
21
  attribute? :close_date, Types::Integer
22
+ attribute? :description, Types::String
23
+ attribute? :description_entities, Types::Array.of(MessageEntity)
21
24
  end
22
25
  end
23
26
  end
@@ -8,6 +8,7 @@ module Telegram
8
8
  attribute? :voter_chat, Chat
9
9
  attribute? :user, User
10
10
  attribute :option_ids, Types::Array.of(Types::Integer)
11
+ attribute :option_persistent_ids, Types::Array.of(Types::String)
11
12
  end
12
13
  end
13
14
  end
@@ -4,9 +4,13 @@ module Telegram
4
4
  module Bot
5
5
  module Types
6
6
  class PollOption < Base
7
+ attribute :persistent_id, Types::String
7
8
  attribute :text, Types::String.constrained(min_size: 1, max_size: 100)
8
9
  attribute? :text_entities, Types::Array.of(MessageEntity)
9
10
  attribute :voter_count, Types::Integer
11
+ attribute? :added_by_user, User
12
+ attribute? :added_by_chat, Chat
13
+ attribute? :addition_date, Types::Integer
10
14
  end
11
15
  end
12
16
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class PollOptionAdded < Base
7
+ attribute? :poll_message, MaybeInaccessibleMessage
8
+ attribute :option_persistent_id, Types::String
9
+ attribute :option_text, Types::String
10
+ attribute? :option_text_entities, Types::Array.of(MessageEntity)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class PollOptionDeleted < Base
7
+ attribute? :poll_message, MaybeInaccessibleMessage
8
+ attribute :option_persistent_id, Types::String
9
+ attribute :option_text, Types::String
10
+ attribute? :option_text_entities, Types::Array.of(MessageEntity)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class PreparedKeyboardButton < Base
7
+ attribute :id, Types::String
8
+ end
9
+ end
10
+ end
11
+ end
@@ -12,6 +12,7 @@ module Telegram
12
12
  attribute? :quote_entities, Types::Array.of(MessageEntity)
13
13
  attribute? :quote_position, Types::Integer
14
14
  attribute? :checklist_task_id, Types::Integer
15
+ attribute? :poll_option_id, Types::String
15
16
  end
16
17
  end
17
18
  end
@@ -28,6 +28,7 @@ module Telegram
28
28
  attribute? :chat_join_request, ChatJoinRequest
29
29
  attribute? :chat_boost, ChatBoostUpdated
30
30
  attribute? :removed_chat_boost, ChatBoostRemoved
31
+ attribute? :managed_bot, ManagedBotUpdated
31
32
 
32
33
  def current_message
33
34
  @current_message ||=
@@ -19,6 +19,7 @@ module Telegram
19
19
  attribute? :has_main_web_app, Types::Bool
20
20
  attribute? :has_topics_enabled, Types::Bool
21
21
  attribute? :allows_users_to_create_topics, Types::Bool
22
+ attribute? :can_manage_bots, Types::Bool
22
23
  end
23
24
  end
24
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Telegram
4
4
  module Bot
5
- VERSION = '2.6.0'
5
+ VERSION = '2.7.0'
6
6
  end
7
7
  end
data/mise.toml ADDED
@@ -0,0 +1,2 @@
1
+ [tools]
2
+ ruby = "4"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
@@ -251,12 +251,15 @@ files:
251
251
  - lib/telegram/bot/types/keyboard_button.rb
252
252
  - lib/telegram/bot/types/keyboard_button_poll_type.rb
253
253
  - lib/telegram/bot/types/keyboard_button_request_chat.rb
254
+ - lib/telegram/bot/types/keyboard_button_request_managed_bot.rb
254
255
  - lib/telegram/bot/types/keyboard_button_request_users.rb
255
256
  - lib/telegram/bot/types/labeled_price.rb
256
257
  - lib/telegram/bot/types/link_preview_options.rb
257
258
  - lib/telegram/bot/types/location.rb
258
259
  - lib/telegram/bot/types/location_address.rb
259
260
  - lib/telegram/bot/types/login_url.rb
261
+ - lib/telegram/bot/types/managed_bot_created.rb
262
+ - lib/telegram/bot/types/managed_bot_updated.rb
260
263
  - lib/telegram/bot/types/mask_position.rb
261
264
  - lib/telegram/bot/types/maybe_inaccessible_message.rb
262
265
  - lib/telegram/bot/types/menu_button.rb
@@ -303,8 +306,11 @@ files:
303
306
  - lib/telegram/bot/types/poll.rb
304
307
  - lib/telegram/bot/types/poll_answer.rb
305
308
  - lib/telegram/bot/types/poll_option.rb
309
+ - lib/telegram/bot/types/poll_option_added.rb
310
+ - lib/telegram/bot/types/poll_option_deleted.rb
306
311
  - lib/telegram/bot/types/pre_checkout_query.rb
307
312
  - lib/telegram/bot/types/prepared_inline_message.rb
313
+ - lib/telegram/bot/types/prepared_keyboard_button.rb
308
314
  - lib/telegram/bot/types/proximity_alert_triggered.rb
309
315
  - lib/telegram/bot/types/reaction_count.rb
310
316
  - lib/telegram/bot/types/reaction_type.rb
@@ -386,6 +392,7 @@ files:
386
392
  - lib/telegram/bot/types/webhook_info.rb
387
393
  - lib/telegram/bot/types/write_access_allowed.rb
388
394
  - lib/telegram/bot/version.rb
395
+ - mise.toml
389
396
  - rakelib/builders/endpoints_builder.rb
390
397
  - rakelib/builders/type_builder.rb
391
398
  - rakelib/parse.rake
@@ -414,7 +421,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
414
421
  - !ruby/object:Gem::Version
415
422
  version: '0'
416
423
  requirements: []
417
- rubygems_version: 3.6.9
424
+ rubygems_version: 4.0.3
418
425
  specification_version: 4
419
426
  summary: Ruby wrapper for Telegram's Bot API
420
427
  test_files: []