telegram-bot-ruby 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +8 -3
  3. data/CHANGELOG.md +5 -0
  4. data/Gemfile +2 -0
  5. data/Rakefile +3 -1
  6. data/examples/bot.rb +2 -0
  7. data/lib/telegram/bot/api.rb +7 -3
  8. data/lib/telegram/bot/client.rb +4 -3
  9. data/lib/telegram/bot/configuration.rb +5 -1
  10. data/lib/telegram/bot/exceptions/base.rb +2 -0
  11. data/lib/telegram/bot/exceptions/response_error.rb +3 -0
  12. data/lib/telegram/bot/exceptions.rb +2 -0
  13. data/lib/telegram/bot/null_logger.rb +3 -1
  14. data/lib/telegram/bot/types/animation.rb +2 -0
  15. data/lib/telegram/bot/types/audio.rb +2 -0
  16. data/lib/telegram/bot/types/base.rb +2 -0
  17. data/lib/telegram/bot/types/bot_command.rb +2 -0
  18. data/lib/telegram/bot/types/bot_command_scope_all_chat_administrators.rb +2 -0
  19. data/lib/telegram/bot/types/bot_command_scope_all_group_chats.rb +2 -0
  20. data/lib/telegram/bot/types/bot_command_scope_all_private_chats.rb +2 -0
  21. data/lib/telegram/bot/types/bot_command_scope_chat.rb +2 -0
  22. data/lib/telegram/bot/types/bot_command_scope_chat_administrators.rb +2 -0
  23. data/lib/telegram/bot/types/bot_command_scope_chat_member.rb +2 -0
  24. data/lib/telegram/bot/types/bot_command_scope_default.rb +2 -0
  25. data/lib/telegram/bot/types/callback_game.rb +2 -0
  26. data/lib/telegram/bot/types/callback_query.rb +2 -0
  27. data/lib/telegram/bot/types/chat.rb +2 -0
  28. data/lib/telegram/bot/types/chat_administrator_rights.rb +21 -0
  29. data/lib/telegram/bot/types/chat_invite_link.rb +2 -0
  30. data/lib/telegram/bot/types/chat_join_request.rb +2 -0
  31. data/lib/telegram/bot/types/chat_location.rb +2 -0
  32. data/lib/telegram/bot/types/chat_member.rb +3 -1
  33. data/lib/telegram/bot/types/chat_member_updated.rb +2 -0
  34. data/lib/telegram/bot/types/chat_permissions.rb +2 -0
  35. data/lib/telegram/bot/types/chat_photo.rb +2 -0
  36. data/lib/telegram/bot/types/chosen_inline_result.rb +2 -0
  37. data/lib/telegram/bot/types/compactable.rb +4 -2
  38. data/lib/telegram/bot/types/contact.rb +2 -0
  39. data/lib/telegram/bot/types/dice.rb +2 -0
  40. data/lib/telegram/bot/types/document.rb +2 -0
  41. data/lib/telegram/bot/types/encrypted_credentials.rb +2 -0
  42. data/lib/telegram/bot/types/encrypted_passport_element.rb +2 -0
  43. data/lib/telegram/bot/types/file.rb +2 -0
  44. data/lib/telegram/bot/types/force_reply.rb +2 -0
  45. data/lib/telegram/bot/types/game.rb +2 -0
  46. data/lib/telegram/bot/types/game_high_score.rb +2 -0
  47. data/lib/telegram/bot/types/inline_keyboard_button.rb +4 -1
  48. data/lib/telegram/bot/types/inline_keyboard_markup.rb +2 -0
  49. data/lib/telegram/bot/types/inline_query.rb +2 -0
  50. data/lib/telegram/bot/types/inline_query_result_article.rb +2 -0
  51. data/lib/telegram/bot/types/inline_query_result_audio.rb +2 -0
  52. data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +2 -0
  53. data/lib/telegram/bot/types/inline_query_result_cached_document.rb +2 -0
  54. data/lib/telegram/bot/types/inline_query_result_cached_gif.rb +2 -0
  55. data/lib/telegram/bot/types/inline_query_result_cached_mpeg4_gif.rb +2 -0
  56. data/lib/telegram/bot/types/inline_query_result_cached_photo.rb +2 -0
  57. data/lib/telegram/bot/types/inline_query_result_cached_sticker.rb +2 -0
  58. data/lib/telegram/bot/types/inline_query_result_cached_video.rb +2 -0
  59. data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +2 -0
  60. data/lib/telegram/bot/types/inline_query_result_contact.rb +2 -0
  61. data/lib/telegram/bot/types/inline_query_result_document.rb +2 -0
  62. data/lib/telegram/bot/types/inline_query_result_game.rb +2 -0
  63. data/lib/telegram/bot/types/inline_query_result_gif.rb +2 -0
  64. data/lib/telegram/bot/types/inline_query_result_location.rb +2 -0
  65. data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +2 -0
  66. data/lib/telegram/bot/types/inline_query_result_photo.rb +2 -0
  67. data/lib/telegram/bot/types/inline_query_result_venue.rb +2 -0
  68. data/lib/telegram/bot/types/inline_query_result_video.rb +2 -0
  69. data/lib/telegram/bot/types/inline_query_result_voice.rb +2 -0
  70. data/lib/telegram/bot/types/input_contact_message_content.rb +2 -0
  71. data/lib/telegram/bot/types/input_invoice_message_content.rb +2 -0
  72. data/lib/telegram/bot/types/input_location_message_content.rb +2 -0
  73. data/lib/telegram/bot/types/input_media_animation.rb +2 -0
  74. data/lib/telegram/bot/types/input_media_audio.rb +2 -0
  75. data/lib/telegram/bot/types/input_media_document.rb +2 -0
  76. data/lib/telegram/bot/types/input_media_photo.rb +2 -0
  77. data/lib/telegram/bot/types/input_media_video.rb +2 -0
  78. data/lib/telegram/bot/types/input_message_content.rb +2 -0
  79. data/lib/telegram/bot/types/input_text_message_content.rb +2 -0
  80. data/lib/telegram/bot/types/input_venue_message_content.rb +2 -0
  81. data/lib/telegram/bot/types/invoice.rb +2 -0
  82. data/lib/telegram/bot/types/keyboard_button.rb +3 -0
  83. data/lib/telegram/bot/types/keyboard_button_poll_type.rb +2 -0
  84. data/lib/telegram/bot/types/labeled_price.rb +2 -0
  85. data/lib/telegram/bot/types/location.rb +2 -0
  86. data/lib/telegram/bot/types/login_url.rb +2 -0
  87. data/lib/telegram/bot/types/mask_position.rb +2 -0
  88. data/lib/telegram/bot/types/menu_button_commands.rb +11 -0
  89. data/lib/telegram/bot/types/menu_button_default.rb +11 -0
  90. data/lib/telegram/bot/types/menu_button_web_app.rb +13 -0
  91. data/lib/telegram/bot/types/message.rb +7 -4
  92. data/lib/telegram/bot/types/message_auto_delete_timer_changed.rb +2 -0
  93. data/lib/telegram/bot/types/message_entity.rb +2 -0
  94. data/lib/telegram/bot/types/order_info.rb +2 -0
  95. data/lib/telegram/bot/types/passport_data.rb +2 -0
  96. data/lib/telegram/bot/types/passport_element_error_data_field.rb +2 -0
  97. data/lib/telegram/bot/types/passport_element_error_file.rb +2 -0
  98. data/lib/telegram/bot/types/passport_element_error_files.rb +2 -0
  99. data/lib/telegram/bot/types/passport_element_error_front_side.rb +2 -0
  100. data/lib/telegram/bot/types/passport_element_error_reverse_side.rb +2 -0
  101. data/lib/telegram/bot/types/passport_element_error_selfie.rb +2 -0
  102. data/lib/telegram/bot/types/passport_element_error_translation_file.rb +2 -0
  103. data/lib/telegram/bot/types/passport_element_error_translation_files.rb +2 -0
  104. data/lib/telegram/bot/types/passport_element_error_unspecified.rb +2 -0
  105. data/lib/telegram/bot/types/passport_file.rb +2 -0
  106. data/lib/telegram/bot/types/pattern_matching.rb +2 -0
  107. data/lib/telegram/bot/types/photo_size.rb +2 -0
  108. data/lib/telegram/bot/types/poll.rb +2 -0
  109. data/lib/telegram/bot/types/poll_answer.rb +2 -0
  110. data/lib/telegram/bot/types/poll_option.rb +2 -0
  111. data/lib/telegram/bot/types/pre_checkout_query.rb +2 -0
  112. data/lib/telegram/bot/types/proximity_alert_triggered.rb +2 -0
  113. data/lib/telegram/bot/types/reply_keyboard_markup.rb +2 -0
  114. data/lib/telegram/bot/types/reply_keyboard_remove.rb +2 -0
  115. data/lib/telegram/bot/types/sent_web_app_message.rb +11 -0
  116. data/lib/telegram/bot/types/shipping_address.rb +2 -0
  117. data/lib/telegram/bot/types/shipping_option.rb +2 -0
  118. data/lib/telegram/bot/types/shipping_query.rb +2 -0
  119. data/lib/telegram/bot/types/sticker.rb +2 -0
  120. data/lib/telegram/bot/types/sticker_set.rb +2 -0
  121. data/lib/telegram/bot/types/successful_payment.rb +2 -0
  122. data/lib/telegram/bot/types/update.rb +2 -0
  123. data/lib/telegram/bot/types/user.rb +2 -0
  124. data/lib/telegram/bot/types/user_profile_photos.rb +2 -0
  125. data/lib/telegram/bot/types/venue.rb +2 -0
  126. data/lib/telegram/bot/types/video.rb +2 -0
  127. data/lib/telegram/bot/types/{voice_chat_ended.rb → video_chat_ended.rb} +3 -1
  128. data/lib/telegram/bot/types/{voice_chat_participants_invited.rb → video_chat_participants_invited.rb} +3 -1
  129. data/lib/telegram/bot/types/{voice_chat_scheduled.rb → video_chat_scheduled.rb} +3 -1
  130. data/lib/telegram/bot/types/{voice_chat_started.rb → video_chat_started.rb} +3 -1
  131. data/lib/telegram/bot/types/video_note.rb +2 -0
  132. data/lib/telegram/bot/types/voice.rb +2 -0
  133. data/lib/telegram/bot/types/web_app_data.rb +12 -0
  134. data/lib/telegram/bot/types/web_app_info.rb +11 -0
  135. data/lib/telegram/bot/types/webhook_info.rb +3 -1
  136. data/lib/telegram/bot/types.rb +13 -4
  137. data/lib/telegram/bot/version.rb +3 -1
  138. data/lib/telegram/bot.rb +2 -0
  139. data/telegram-bot-ruby.gemspec +8 -5
  140. metadata +43 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8926e9101b449b8f38edab0c8497cb950d7806ac8e7762fa016875c557fa8f4f
4
- data.tar.gz: 672f59e2be73cac12311244402960e84f14cd8c206891b33b33eca5adb8d89e9
3
+ metadata.gz: f4a3f55636b586f9c0c40a020c0eec4686fe4c664946dcb560422c3082d82b6c
4
+ data.tar.gz: c44b6c28251b3183e5b3bb7256851d0b92f638bcc24b2fd4a188c21aa28beeca
5
5
  SHA512:
6
- metadata.gz: ff205984af1416bac8ee5919fdf9dbf72d042beb6e7e92df8aaab8dd824d4d087a9b71d603133dfbd9cfafc8c9b0ee71e066a587f674905a6828e64e96abb398
7
- data.tar.gz: 8792c770b06c84b38f72b32716c01aa8dd207dffb72c2937387630f1a8e7e7c522c85c5f30ece246c6384c4e546b2b8433b07702c250d79331da97d71e1839e0
6
+ metadata.gz: 31c46eeb60c9c176ba58ba42811968e5c7b7db40849024f1626147f482c06a4e884843ed228a0a8391feeb69682521bec80d92ebac5fdb531dbadaa386193239
7
+ data.tar.gz: e3ec13011270299788f4e3e0329c98f9186621b669961e8c669d82a974b1579bf023f70f643071b4eefd5ceec69ebede0ff733cc935e207a2bcaaad9417b9b2e
data/.rubocop.yml CHANGED
@@ -1,15 +1,20 @@
1
1
  ---
2
- require: rubocop-rspec
2
+ require:
3
+ - rubocop-rake
4
+ - rubocop-rspec
5
+
6
+ AllCops:
7
+ NewCops: enable
3
8
 
4
9
  Style/Documentation:
5
10
  Enabled: false
6
11
 
7
12
  Metrics/BlockLength:
8
- ExcludedMethods:
13
+ IgnoredMethods:
9
14
  - context
10
15
  - describe
11
16
 
12
- Metrics/LineLength:
17
+ Layout/LineLength:
13
18
  Max: 120
14
19
  Exclude:
15
20
  - telegram-bot-ruby.gemspec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.0
4
+
5
+ - Implement [Bot API 6.0](https://core.telegram.org/bots/api-changelog#april-16-2022)
6
+ - Update rubocop
7
+
3
8
  ## 0.18.0
4
9
 
5
10
  - Implement [Bot API 5.2](https://core.telegram.org/bots/api-changelog#april-26-2021)
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'bundler/setup'
3
5
  require 'rubocop/rake_task'
@@ -6,7 +8,7 @@ require 'rspec/core/rake_task'
6
8
  RuboCop::RakeTask.new(:rubocop) do |task|
7
9
  task.fail_on_error = false
8
10
  task.options = %w[--force-exclusion]
9
- task.patterns = %w[lib/**/*.rb]
11
+ task.patterns = %w[{lib,spec}/**/*.rb Rakefile]
10
12
  task.requires << 'rubocop-rspec'
11
13
  end
12
14
 
data/examples/bot.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'telegram/bot'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  class Api
@@ -59,9 +61,9 @@ module Telegram
59
61
 
60
62
  private
61
63
 
62
- def build_params(h)
63
- h.each_with_object({}) do |(key, value), params|
64
- params[key] = sanitize_value(value)
64
+ def build_params(params)
65
+ params.transform_values do |value|
66
+ sanitize_value(value)
65
67
  end
66
68
  end
67
69
 
@@ -88,6 +90,8 @@ module Telegram
88
90
  faraday.request :multipart
89
91
  faraday.request :url_encoded
90
92
  faraday.adapter Telegram::Bot.configuration.adapter
93
+ faraday.options.timeout = Telegram::Bot.configuration.timeout
94
+ faraday.options.open_timeout = Telegram::Bot.configuration.open_timeout
91
95
  end
92
96
  end
93
97
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  class Client
@@ -33,7 +35,7 @@ module Telegram
33
35
  response['result'].each do |data|
34
36
  yield handle_update(Types::Update.new(data))
35
37
  end
36
- rescue Faraday::TimeoutError
38
+ rescue Faraday::TimeoutError, Faraday::ConnectionFailed
37
39
  retry
38
40
  end
39
41
 
@@ -50,7 +52,6 @@ module Telegram
50
52
  def default_options
51
53
  {
52
54
  offset: 0,
53
- timeout: 20,
54
55
  logger: NullLogger.new,
55
56
  url: 'https://api.telegram.org'
56
57
  }
@@ -59,7 +60,7 @@ module Telegram
59
60
  def log_incoming_message(message)
60
61
  uid = message.respond_to?(:from) && message.from ? message.from.id : nil
61
62
  logger.info(
62
- format('Incoming message: text="%s" uid=%s', message, uid)
63
+ format('Incoming message: text="%<text>s" uid=%<uid>s', message: message, uid: uid)
63
64
  )
64
65
  end
65
66
  end
@@ -1,10 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  class Configuration
4
- attr_accessor :adapter
6
+ attr_accessor :adapter, :open_timeout, :timeout
5
7
 
6
8
  def initialize
7
9
  @adapter = Faraday.default_adapter
10
+ @open_timeout = 20
11
+ @timeout = 20
8
12
  end
9
13
  end
10
14
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Exceptions
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Exceptions
@@ -6,6 +8,7 @@ module Telegram
6
8
 
7
9
  def initialize(response)
8
10
  @response = response
11
+ super
9
12
  end
10
13
 
11
14
  def to_s
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'telegram/bot/exceptions/base'
2
4
  require 'telegram/bot/exceptions/response_error'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  class NullLogger < Logger
4
- def initialize(*); end
6
+ def initialize(*); end # rubocop:disable Lint/MissingSuper
5
7
 
6
8
  def add(*); end
7
9
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class ChatAdministratorRight < Base
7
+ attribute :is_anonymous, Boolean
8
+ attribute :can_manage_chat, Boolean
9
+ attribute :can_delete_messages, Boolean
10
+ attribute :can_manage_video_chats, Boolean
11
+ attribute :can_restrict_members, Boolean
12
+ attribute :can_promote_members, Boolean
13
+ attribute :can_change_info, Boolean
14
+ attribute :can_invite_users, Boolean
15
+ attribute :can_post_messages, Boolean
16
+ attribute :can_edit_messages, Boolean
17
+ attribute :can_pin_messages, Boolean
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -11,7 +13,7 @@ module Telegram
11
13
  attribute :can_post_messages, Boolean
12
14
  attribute :can_edit_messages, Boolean
13
15
  attribute :can_delete_messages, Boolean
14
- attribute :can_manage_voice_chats, Boolean
16
+ attribute :can_manage_video_chats, Boolean
15
17
  attribute :can_restrict_members, Boolean
16
18
  attribute :can_promote_members, Boolean
17
19
  attribute :can_change_info, Boolean
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
6
  module Compactable
5
7
  def to_compact_hash
6
- Hash[attributes.dup.delete_if { |_, v| v.nil? }.map do |key, value|
8
+ attributes.dup.delete_if { |_, v| v.nil? }.map do |key, value|
7
9
  value =
8
10
  if value.respond_to?(:to_compact_hash)
9
11
  value.to_compact_hash
@@ -12,7 +14,7 @@ module Telegram
12
14
  end
13
15
 
14
16
  [key, value]
15
- end]
17
+ end.to_h
16
18
  end
17
19
 
18
20
  def to_json(*args)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
6
  class InlineKeyboardButton < Base
5
7
  attribute :text, String
6
8
  attribute :url, String
7
- attribute :login_url, LoginUrl
8
9
  attribute :callback_data, String
10
+ attribute :web_app, WebAppInfo
11
+ attribute :login_url, LoginUrl
9
12
  attribute :switch_inline_query, String
10
13
  attribute :switch_inline_query_current_chat, String
11
14
  attribute :callback_game, CallbackGame
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types