telegram-bot-ruby 0.17.0 → 0.18.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: 5b5931412b4f0464fd2cbe2adedf7f23e8b2425a1732f8017eb9fc854d202060
4
- data.tar.gz: a954f05f6201e8354e7cc720be521bdd641948240bb3568c9d83cf9160c83b24
3
+ metadata.gz: 8926e9101b449b8f38edab0c8497cb950d7806ac8e7762fa016875c557fa8f4f
4
+ data.tar.gz: 672f59e2be73cac12311244402960e84f14cd8c206891b33b33eca5adb8d89e9
5
5
  SHA512:
6
- metadata.gz: 999cdc66427a961c164ff4d3e830f1d4c20b5df6487a2e53e44f2566ec2e60de5d540df849b974788c4dd26b53a9add2451022194b4520ae1b2346124e47ea3d
7
- data.tar.gz: df14c4cb348275c9f6eaa6b2698947f62425c63802154163de5d2c532d8cd20bbf57de15439293f2b69bd744321df314840a59ec15fd78f9ef06e85db1ec730f
6
+ metadata.gz: ff205984af1416bac8ee5919fdf9dbf72d042beb6e7e92df8aaab8dd824d4d087a9b71d603133dfbd9cfafc8c9b0ee71e066a587f674905a6828e64e96abb398
7
+ data.tar.gz: 8792c770b06c84b38f72b32716c01aa8dd207dffb72c2937387630f1a8e7e7c522c85c5f30ece246c6384c4e546b2b8433b07702c250d79331da97d71e1839e0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.0
4
+
5
+ - Implement [Bot API 5.2](https://core.telegram.org/bots/api-changelog#april-26-2021)
6
+ - Implement [Bot API 5.3](https://core.telegram.org/bots/api-changelog#june-25-2021)
7
+ - Implement [Bot API 5.4](https://core.telegram.org/bots/api-changelog#november-5-2021)
8
+ - Implement [Bot API 5.5](https://core.telegram.org/bots/api-changelog#december-7-2021)
9
+ - Implement [Bot API 5.6](https://core.telegram.org/bots/api-changelog#december-30-2021)
10
+ - Implement [Bot API 5.7](https://core.telegram.org/bots/api-changelog#january-31-2022)
11
+
3
12
  ## 0.17.0
4
13
 
5
14
  - Pin `faraday` to 1.0
@@ -19,8 +19,10 @@ module Telegram
19
19
  sendGame setGameScore getGameHighScores setPassportDataErrors
20
20
  editMessageMedia sendAnimation sendPoll stopPoll setChatPermissions
21
21
  setChatAdministratorCustomTitle sendDice getMyCommands setMyCommands
22
- setStickerSetThumb logOut close copyMessage createChatInviteLink
23
- editChatInviteLink revokeChatInviteLink
22
+ deleteMyCommands setStickerSetThumb logOut close copyMessage
23
+ createChatInviteLink editChatInviteLink revokeChatInviteLink
24
+ approveChatJoinRequest declineChatJoinRequest banChatSenderChat
25
+ unbanChatSenderChat
24
26
  ].freeze
25
27
 
26
28
  attr_reader :token, :url
@@ -0,0 +1,10 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommand < Base
5
+ attribute :command, String
6
+ attribute :description, String
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeAllChatAdministrators < Base
5
+ attribute :type, String, default: 'all_chat_administrators'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeAllGroupChats < Base
5
+ attribute :type, String, default: 'all_group_chats'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeAllPrivateChats < Base
5
+ attribute :type, String, default: 'all_private_chats'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeChat < Base
5
+ attribute :type, String, default: 'chat'
6
+ attribute :chat_id, String
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeChatAdministrators < Base
5
+ attribute :type, String, default: 'chat_administrators'
6
+ attribute :chat_id, String
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeChatMember < Base
5
+ attribute :type, String, default: 'chat_member'
6
+ attribute :chat_id, String
7
+ attribute :user_id, Integer
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class BotCommandScopeDefault < Base
5
+ attribute :type, String, default: 'default'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -12,15 +12,21 @@ module Telegram
12
12
  attribute :username, String
13
13
  attribute :first_name, String
14
14
  attribute :last_name, String
15
- attribute :all_members_are_administrators, Boolean
16
15
  attribute :photo, ChatPhoto
16
+ attribute :bio, String
17
+ attribute :has_private_forwards, Boolean
17
18
  attribute :description, String
18
19
  attribute :invite_link, String
19
20
  attribute :pinned_message, 'Telegram::Bot::Types::Message'
20
21
  attribute :permissions, ChatPermissions
21
22
  attribute :slow_mode_delay, Integer
23
+ attribute :message_auto_delete_time, Integer
24
+ attribute :has_protected_content, Boolean
22
25
  attribute :sticker_set_name, String
23
26
  attribute :can_set_sticker_set, Boolean
27
+ attribute :all_members_are_administrators, Boolean
28
+ attribute :linked_chat_id, Integer
29
+ attribute :location, ChatLocation
24
30
  end
25
31
  end
26
32
  end
@@ -4,10 +4,13 @@ module Telegram
4
4
  class ChatInviteLink < Base
5
5
  attribute :invite_link, String
6
6
  attribute :creator, User
7
+ attribute :creates_join_request, Boolean
7
8
  attribute :is_primary, Boolean
8
9
  attribute :is_revoked, Boolean
10
+ attribute :name, String
9
11
  attribute :expire_date, Integer
10
12
  attribute :member_limit, Integer
13
+ attribute :pending_join_request_count, Integer
11
14
  end
12
15
  end
13
16
  end
@@ -0,0 +1,13 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class ChatJoinRequest < Base
5
+ attribute :chat, Chat
6
+ attribute :from, User
7
+ attribute :date, Integer
8
+ attribute :bio, String
9
+ attribute :invite_link, ChatInviteLink
10
+ end
11
+ end
12
+ end
13
+ end
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class ForceReply < Base
5
5
  attribute :force_reply, Boolean
6
+ attribute :input_field_placeholder, String
6
7
  attribute :selective, Boolean, default: false
7
8
  end
8
9
  end
@@ -4,9 +4,10 @@ module Telegram
4
4
  class InlineQuery < Base
5
5
  attribute :id, String
6
6
  attribute :from, User
7
- attribute :location, Location
8
7
  attribute :query, String
9
8
  attribute :offset, String
9
+ attribute :chat_type, String
10
+ attribute :location, Location
10
11
 
11
12
  alias to_s query
12
13
  end
@@ -0,0 +1,28 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class InputInvoiceMessageContent < InputMessageContent
5
+ attribute :title, String
6
+ attribute :description, String
7
+ attribute :payload, String
8
+ attribute :provider_token, String
9
+ attribute :currency, String
10
+ attribute :prices, Array[LabeledPrice]
11
+ attribute :max_tip_amount, Integer
12
+ attribute :suggested_tip_amounts, Array[Integer]
13
+ attribute :provider_data, String
14
+ attribute :photo_url, String
15
+ attribute :photo_size, Integer
16
+ attribute :photo_width, Integer
17
+ attribute :photo_height, Integer
18
+ attribute :need_name, Boolean
19
+ attribute :need_phone_number, Boolean
20
+ attribute :need_email, Boolean
21
+ attribute :need_shipping_address, Boolean
22
+ attribute :send_phone_number_to_provider, Boolean
23
+ attribute :send_email_to_provider, Boolean
24
+ attribute :is_flexible, Boolean
25
+ end
26
+ end
27
+ end
28
+ end
@@ -13,29 +13,31 @@ module Telegram
13
13
  attribute :forward_signature, String
14
14
  attribute :forward_sender_name, String
15
15
  attribute :forward_date, Integer
16
+ attribute :is_automatic_forward, Boolean
16
17
  attribute :reply_to_message, Message
17
18
  attribute :via_bot, User
18
19
  attribute :edit_date, Integer
20
+ attribute :has_protected_content, Boolean
19
21
  attribute :media_group_id, String
20
22
  attribute :author_signature, String
21
23
  attribute :text, String
22
24
  attribute :entities, Array[MessageEntity]
23
- attribute :caption_entities, Array[MessageEntity]
25
+ attribute :animation, Animation
24
26
  attribute :audio, Audio
25
27
  attribute :document, Document
26
- attribute :animation, Animation
27
- attribute :game, Game
28
28
  attribute :photo, Array[PhotoSize]
29
29
  attribute :sticker, Sticker
30
30
  attribute :video, Video
31
- attribute :voice, Voice
32
31
  attribute :video_note, VideoNote
32
+ attribute :voice, Voice
33
33
  attribute :caption, String
34
+ attribute :caption_entities, Array[MessageEntity]
34
35
  attribute :contact, Contact
35
36
  attribute :dice, Dice
36
- attribute :location, Location
37
- attribute :venue, Venue
37
+ attribute :game, Game
38
38
  attribute :poll, Poll
39
+ attribute :venue, Venue
40
+ attribute :location, Location
39
41
  attribute :new_chat_members, Array[User]
40
42
  attribute :left_chat_member, User
41
43
  attribute :new_chat_title, String
@@ -53,6 +55,7 @@ module Telegram
53
55
  attribute :connected_website, String
54
56
  attribute :passport_data, PassportData
55
57
  attribute :proximity_alert_triggered, ProximityAlertTriggered
58
+ attribute :voice_chat_scheduled, VoiceChatScheduled
56
59
  attribute :voice_chat_started, VoiceChatStarted
57
60
  attribute :voice_chat_ended, VoiceChatEnded
58
61
  attribute :voice_chat_participants_invited, VoiceChatParticipantsInvited
@@ -5,6 +5,7 @@ module Telegram
5
5
  attribute :keyboard, Array[Array[KeyboardButton]]
6
6
  attribute :resize_keyboard, Boolean, default: false
7
7
  attribute :one_time_keyboard, Boolean, default: false
8
+ attribute :input_field_placeholder, String
8
9
  attribute :selective, Boolean, default: false
9
10
 
10
11
  def to_compact_hash
@@ -7,6 +7,7 @@ module Telegram
7
7
  attribute :width, Integer
8
8
  attribute :height, Integer
9
9
  attribute :is_animated, Boolean
10
+ attribute :is_video, Boolean
10
11
  attribute :thumb, PhotoSize
11
12
  attribute :emoji, String
12
13
  attribute :set_name, String
@@ -5,6 +5,7 @@ module Telegram
5
5
  attribute :name, String
6
6
  attribute :title, String
7
7
  attribute :is_animated, Boolean
8
+ attribute :is_video, Boolean
8
9
  attribute :contains_masks, Boolean
9
10
  attribute :stickers, Array[Sticker]
10
11
  attribute :thumb, PhotoSize
@@ -16,6 +16,7 @@ module Telegram
16
16
  attribute :poll_answer, PollAnswer
17
17
  attribute :my_chat_member, ChatMemberUpdated
18
18
  attribute :chat_member, ChatMemberUpdated
19
+ attribute :chat_join_request, ChatJoinRequest
19
20
 
20
21
  def current_message
21
22
  @current_message ||=
@@ -0,0 +1,9 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class VoiceChatScheduled < Base
5
+ attribute :start_date, Integer
6
+ end
7
+ end
8
+ end
9
+ end
@@ -16,6 +16,7 @@ require 'telegram/bot/types/dice'
16
16
  require 'telegram/bot/types/location'
17
17
  require 'telegram/bot/types/chat_photo'
18
18
  require 'telegram/bot/types/chat_permissions'
19
+ require 'telegram/bot/types/chat_location'
19
20
  require 'telegram/bot/types/chat'
20
21
  require 'telegram/bot/types/message_entity'
21
22
  require 'telegram/bot/types/venue'
@@ -43,8 +44,10 @@ require 'telegram/bot/types/passport_element_error_files'
43
44
  require 'telegram/bot/types/passport_element_error_translation_file'
44
45
  require 'telegram/bot/types/passport_element_error_translation_files'
45
46
  require 'telegram/bot/types/passport_element_error_unspecified'
47
+ require 'telegram/bot/types/labeled_price'
46
48
  require 'telegram/bot/types/input_message_content'
47
49
  require 'telegram/bot/types/input_contact_message_content'
50
+ require 'telegram/bot/types/input_invoice_message_content'
48
51
  require 'telegram/bot/types/input_location_message_content'
49
52
  require 'telegram/bot/types/input_text_message_content'
50
53
  require 'telegram/bot/types/input_venue_message_content'
@@ -74,6 +77,7 @@ require 'telegram/bot/types/inline_query_result_video'
74
77
  require 'telegram/bot/types/inline_query_result_voice'
75
78
  require 'telegram/bot/types/chosen_inline_result'
76
79
  require 'telegram/bot/types/proximity_alert_triggered'
80
+ require 'telegram/bot/types/voice_chat_scheduled'
77
81
  require 'telegram/bot/types/voice_chat_started'
78
82
  require 'telegram/bot/types/voice_chat_ended'
79
83
  require 'telegram/bot/types/voice_chat_participants_invited'
@@ -88,11 +92,11 @@ require 'telegram/bot/types/reply_keyboard_markup'
88
92
  require 'telegram/bot/types/reply_keyboard_remove'
89
93
  require 'telegram/bot/types/force_reply'
90
94
  require 'telegram/bot/types/file'
91
- require 'telegram/bot/types/labeled_price'
92
95
  require 'telegram/bot/types/shipping_option'
93
96
  require 'telegram/bot/types/chat_invite_link'
94
97
  require 'telegram/bot/types/chat_member'
95
98
  require 'telegram/bot/types/chat_member_updated'
99
+ require 'telegram/bot/types/chat_join_request'
96
100
  require 'telegram/bot/types/update'
97
101
  require 'telegram/bot/types/user_profile_photos'
98
102
  require 'telegram/bot/types/input_media_photo'
@@ -101,6 +105,13 @@ require 'telegram/bot/types/input_media_animation'
101
105
  require 'telegram/bot/types/input_media_audio'
102
106
  require 'telegram/bot/types/input_media_document'
103
107
  require 'telegram/bot/types/webhook_info'
104
- require 'telegram/bot/types/chat_location'
108
+ require 'telegram/bot/types/bot_command'
109
+ require 'telegram/bot/types/bot_command_scope_all_chat_administrators'
110
+ require 'telegram/bot/types/bot_command_scope_all_group_chats'
111
+ require 'telegram/bot/types/bot_command_scope_all_private_chats'
112
+ require 'telegram/bot/types/bot_command_scope_chat_administrators'
113
+ require 'telegram/bot/types/bot_command_scope_chat_member'
114
+ require 'telegram/bot/types/bot_command_scope_chat'
115
+ require 'telegram/bot/types/bot_command_scope_default'
105
116
 
106
117
  Virtus.finalize
@@ -1,5 +1,5 @@
1
1
  module Telegram
2
2
  module Bot
3
- VERSION = '0.17.0'.freeze
3
+ VERSION = '0.18.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-14 00:00:00.000000000 Z
11
+ date: 2022-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -153,10 +153,19 @@ files:
153
153
  - lib/telegram/bot/types/animation.rb
154
154
  - lib/telegram/bot/types/audio.rb
155
155
  - lib/telegram/bot/types/base.rb
156
+ - lib/telegram/bot/types/bot_command.rb
157
+ - lib/telegram/bot/types/bot_command_scope_all_chat_administrators.rb
158
+ - lib/telegram/bot/types/bot_command_scope_all_group_chats.rb
159
+ - lib/telegram/bot/types/bot_command_scope_all_private_chats.rb
160
+ - lib/telegram/bot/types/bot_command_scope_chat.rb
161
+ - lib/telegram/bot/types/bot_command_scope_chat_administrators.rb
162
+ - lib/telegram/bot/types/bot_command_scope_chat_member.rb
163
+ - lib/telegram/bot/types/bot_command_scope_default.rb
156
164
  - lib/telegram/bot/types/callback_game.rb
157
165
  - lib/telegram/bot/types/callback_query.rb
158
166
  - lib/telegram/bot/types/chat.rb
159
167
  - lib/telegram/bot/types/chat_invite_link.rb
168
+ - lib/telegram/bot/types/chat_join_request.rb
160
169
  - lib/telegram/bot/types/chat_location.rb
161
170
  - lib/telegram/bot/types/chat_member.rb
162
171
  - lib/telegram/bot/types/chat_member_updated.rb
@@ -197,6 +206,7 @@ files:
197
206
  - lib/telegram/bot/types/inline_query_result_video.rb
198
207
  - lib/telegram/bot/types/inline_query_result_voice.rb
199
208
  - lib/telegram/bot/types/input_contact_message_content.rb
209
+ - lib/telegram/bot/types/input_invoice_message_content.rb
200
210
  - lib/telegram/bot/types/input_location_message_content.rb
201
211
  - lib/telegram/bot/types/input_media_animation.rb
202
212
  - lib/telegram/bot/types/input_media_audio.rb
@@ -252,6 +262,7 @@ files:
252
262
  - lib/telegram/bot/types/voice.rb
253
263
  - lib/telegram/bot/types/voice_chat_ended.rb
254
264
  - lib/telegram/bot/types/voice_chat_participants_invited.rb
265
+ - lib/telegram/bot/types/voice_chat_scheduled.rb
255
266
  - lib/telegram/bot/types/voice_chat_started.rb
256
267
  - lib/telegram/bot/types/webhook_info.rb
257
268
  - lib/telegram/bot/version.rb