telegram-bot-ruby 2.9.0 → 2.10.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: 811d9386bc12035ad8683176592b236f15c0a37d50e255a4c9a8140adad8677a
4
- data.tar.gz: f6aebdaee858a97d59ec00a1b6b23d2d1a25d501311530e28cdedd5b970c5fe2
3
+ metadata.gz: f02ebffe264a4adb93ca7b0f31adafa879996506bdcaa04f5334ba5abca2d164
4
+ data.tar.gz: 28fd39d99bb93dc48d90bc1c8556556825da827508d99cb4b5968004aa43b9f6
5
5
  SHA512:
6
- metadata.gz: f9472750fce1eec6ce1f91074b8ef4fb830f162fd6c6ee9564901b9f67656edca9bf45dd84f72b856e3c874c6e890b05eddb41f0a4205ad3f45cd6380a3e500a
7
- data.tar.gz: 572f10343ea270f1ddc2944aed0d5c0bd4676fe51473ebcd1a707cb2d1bad26de0774fba08c3f8355d32bce2ab4c695f53cbdfe402bd5da76176f09bc7929854
6
+ metadata.gz: 0b29bc839438e4c030f3f5bebd2f86cf12e685f52ea63aaff99785c817f8dda0dd166acd78eca19bf79bbc8a22f5a550e0d0e3160c96cd2ecffd295531922263
7
+ data.tar.gz: 00d1d31e6024fe8de896cc40ec0455b68c55d5d3feb78e8249fe0b577f7fe82edd008e2b1fe26da59431edcd6a3f4ce84c252e6fe3969cc1d185496a39829548
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.10.0
4
+
5
+ ### Added
6
+
7
+ - [Bot API 10.5](https://core.telegram.org/bots/api-changelog#november-22-2026), including `set_my_settings` and `WriteAccessAllowed#inviter`.
8
+
9
+ ### Changed
10
+
11
+ - `get_me` now returns `BotFullInfo`. Bot settings previously exposed on `User` are now fields on `BotFullInfo`.
12
+ - Incoming and outgoing expandable block quotations now use `blocks` in place of `text`.
13
+
3
14
  ## 2.9.0
4
15
 
5
16
  ### Added
data/README.md CHANGED
@@ -11,7 +11,7 @@ Ruby wrapper for [Telegram's Bot API](https://core.telegram.org/bots/api).
11
11
  Add following line to your Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'telegram-bot-ruby', '~> 2.8'
14
+ gem 'telegram-bot-ruby', '~> 2.10'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -8,7 +8,7 @@ module Telegram
8
8
  'setWebhook' => Types::Bool,
9
9
  'deleteWebhook' => Types::Bool,
10
10
  'getWebhookInfo' => Types::WebhookInfo,
11
- 'getMe' => Types::User,
11
+ 'getMe' => Types::BotFullInfo,
12
12
  'logOut' => Types::Bool,
13
13
  'close' => Types::Bool,
14
14
  'sendMessage' => Types::Message,
@@ -98,6 +98,7 @@ module Telegram
98
98
  'replaceManagedBotToken' => Types::String,
99
99
  'getManagedBotAccessSettings' => Types::BotAccessSettings,
100
100
  'setManagedBotAccessSettings' => Types::Bool,
101
+ 'setMySettings' => Types::Bool,
101
102
  'setMyCommands' => Types::Bool,
102
103
  'deleteMyCommands' => Types::Bool,
103
104
  'getMyCommands' => Types::Array.of(Types::BotCommand),
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class BotFullInfo < Base
7
+ attribute :id, Types::Integer
8
+ attribute :is_bot, Types::True
9
+ attribute :first_name, Types::String
10
+ attribute? :username, Types::String
11
+ attribute? :active_usernames, Types::Array.of(Types::String)
12
+ attribute :can_join_groups, Types::Bool
13
+ attribute :can_read_all_group_messages, Types::Bool
14
+ attribute :supports_guest_queries, Types::Bool
15
+ attribute :supports_inline_queries, Types::Bool
16
+ attribute? :inline_query_placeholder, Types::String
17
+ attribute :needs_inline_query_location, Types::Bool
18
+ attribute :can_connect_to_business, Types::Bool
19
+ attribute :has_main_web_app, Types::Bool
20
+ attribute :has_topics_enabled, Types::Bool
21
+ attribute :allows_users_to_create_topics, Types::Bool
22
+ attribute :has_topic_sidebar, Types::Bool
23
+ attribute :can_manage_bots, Types::Bool
24
+ attribute :supports_join_request_queries, Types::Bool
25
+ end
26
+ end
27
+ end
28
+ end
@@ -5,7 +5,7 @@ module Telegram
5
5
  module Types
6
6
  class InputRichBlockExpandableBlockQuotation < Base
7
7
  attribute :type, Types::String.constrained(eql: 'expandable_blockquote').default('expandable_blockquote')
8
- attribute :text, RichText
8
+ attribute :blocks, Types::Array.of(Types.deferred(:InputRichBlock))
9
9
  attribute? :credit, RichText
10
10
  end
11
11
  end
@@ -5,7 +5,7 @@ module Telegram
5
5
  module Types
6
6
  class RichBlockExpandableBlockQuotation < Base
7
7
  attribute :type, Types::String.constrained(eql: 'expandable_blockquote').default('expandable_blockquote')
8
- attribute :text, RichText
8
+ attribute :blocks, Types::Array.of(Types.deferred(:RichBlock))
9
9
  attribute? :credit, RichText
10
10
  end
11
11
  end
@@ -12,16 +12,6 @@ module Telegram
12
12
  attribute? :language_code, Types::String
13
13
  attribute? :is_premium, Types::True
14
14
  attribute? :added_to_attachment_menu, Types::True
15
- attribute? :can_join_groups, Types::Bool
16
- attribute? :can_read_all_group_messages, Types::Bool
17
- attribute? :supports_guest_queries, Types::Bool
18
- attribute? :supports_inline_queries, Types::Bool
19
- attribute? :can_connect_to_business, Types::Bool
20
- attribute? :has_main_web_app, Types::Bool
21
- attribute? :has_topics_enabled, Types::Bool
22
- attribute? :allows_users_to_create_topics, Types::Bool
23
- attribute? :can_manage_bots, Types::Bool
24
- attribute? :supports_join_request_queries, Types::Bool
25
15
  end
26
16
  end
27
17
  end
@@ -7,6 +7,7 @@ module Telegram
7
7
  attribute? :from_request, Types::Bool
8
8
  attribute? :web_app_name, Types::String
9
9
  attribute? :from_attachment_menu, Types::Bool
10
+ attribute? :inviter, User
10
11
  end
11
12
  end
12
13
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Telegram
4
4
  module Bot
5
- VERSION = '2.9.0'
5
+ VERSION = '2.10.0'
6
6
  end
7
7
  end
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.9.0
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
@@ -125,6 +125,7 @@ files:
125
125
  - lib/telegram/bot/types/bot_command_scope_chat_member.rb
126
126
  - lib/telegram/bot/types/bot_command_scope_default.rb
127
127
  - lib/telegram/bot/types/bot_description.rb
128
+ - lib/telegram/bot/types/bot_full_info.rb
128
129
  - lib/telegram/bot/types/bot_name.rb
129
130
  - lib/telegram/bot/types/bot_short_description.rb
130
131
  - lib/telegram/bot/types/bot_subscription_updated.rb