telegram-bot-ruby 0.18.0 → 0.19.2

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 +10 -4
  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
@@ -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
@@ -6,6 +8,7 @@ module Telegram
6
8
  attribute :request_contact, Boolean
7
9
  attribute :request_location, Boolean
8
10
  attribute :request_poll, KeyboardButtonPollType
11
+ attribute :web_app, WebAppInfo
9
12
  end
10
13
  end
11
14
  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
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class MenuButtonCommands < Base
7
+ attribute :type, String, default: 'commands'
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class MenuButtonDefault < Base
7
+ attribute :type, String, default: 'default'
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class MenuButtonWebApp < Base
7
+ attribute :type, String, default: 'web_app'
8
+ attribute :text, String
9
+ attribute :web_app, WebAppInfo
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -55,10 +57,11 @@ module Telegram
55
57
  attribute :connected_website, String
56
58
  attribute :passport_data, PassportData
57
59
  attribute :proximity_alert_triggered, ProximityAlertTriggered
58
- attribute :voice_chat_scheduled, VoiceChatScheduled
59
- attribute :voice_chat_started, VoiceChatStarted
60
- attribute :voice_chat_ended, VoiceChatEnded
61
- attribute :voice_chat_participants_invited, VoiceChatParticipantsInvited
60
+ attribute :video_chat_scheduled, VideoChatScheduled
61
+ attribute :video_chat_started, VideoChatStarted
62
+ attribute :video_chat_ended, VideoChatEnded
63
+ attribute :video_chat_participants_invited, VideoChatParticipantsInvited
64
+ attribute :web_app_data, WebAppData
62
65
  attribute :reply_markup, InlineKeyboardMarkup
63
66
 
64
67
  alias to_s text
@@ -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
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class SentWebAppMessage < Base
7
+ attribute :inline_message_id, String
8
+ end
9
+ end
10
+ end
11
+ 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,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
- class VoiceChatEnded < Base
6
+ class VideoChatEnded < Base
5
7
  attribute :duration, Integer
6
8
  end
7
9
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
- class VoiceChatParticipantsInvited < Base
6
+ class VideoChatParticipantsInvited < Base
5
7
  attribute :users, Array[User]
6
8
  end
7
9
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
- class VoiceChatScheduled < Base
6
+ class VideoChatScheduled < Base
5
7
  attribute :start_date, Integer
6
8
  end
7
9
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
- class VoiceChatStarted < Base
6
+ class VideoChatStarted < Base
5
7
  end
6
8
  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
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class WebAppData < Base
7
+ attribute :data, String
8
+ attribute :button_text, String
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class WebAppInfo < Base
7
+ attribute :url, String
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -8,7 +10,7 @@ module Telegram
8
10
  attribute :ip_address, String
9
11
  attribute :last_error_date, Integer
10
12
  attribute :last_error_message, String
11
- attribute :max_connections, String
13
+ attribute :last_synchronization_error_date, Integer
12
14
  attribute :max_connections, Integer
13
15
  attribute :allowed_updates, Array[String]
14
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'telegram/bot/types/compactable'
2
4
  require 'telegram/bot/types/pattern_matching'
3
5
  require 'telegram/bot/types/base'
@@ -52,6 +54,7 @@ require 'telegram/bot/types/input_location_message_content'
52
54
  require 'telegram/bot/types/input_text_message_content'
53
55
  require 'telegram/bot/types/input_venue_message_content'
54
56
  require 'telegram/bot/types/login_url'
57
+ require 'telegram/bot/types/web_app_info'
55
58
  require 'telegram/bot/types/inline_keyboard_button'
56
59
  require 'telegram/bot/types/inline_keyboard_markup'
57
60
  require 'telegram/bot/types/inline_query'
@@ -77,11 +80,12 @@ require 'telegram/bot/types/inline_query_result_video'
77
80
  require 'telegram/bot/types/inline_query_result_voice'
78
81
  require 'telegram/bot/types/chosen_inline_result'
79
82
  require 'telegram/bot/types/proximity_alert_triggered'
80
- require 'telegram/bot/types/voice_chat_scheduled'
81
- require 'telegram/bot/types/voice_chat_started'
82
- require 'telegram/bot/types/voice_chat_ended'
83
- require 'telegram/bot/types/voice_chat_participants_invited'
83
+ require 'telegram/bot/types/video_chat_scheduled'
84
+ require 'telegram/bot/types/video_chat_started'
85
+ require 'telegram/bot/types/video_chat_ended'
86
+ require 'telegram/bot/types/video_chat_participants_invited'
84
87
  require 'telegram/bot/types/message_auto_delete_timer_changed'
88
+ require 'telegram/bot/types/web_app_data'
85
89
  require 'telegram/bot/types/message'
86
90
  require 'telegram/bot/types/callback_query'
87
91
  require 'telegram/bot/types/shipping_query'
@@ -113,5 +117,10 @@ require 'telegram/bot/types/bot_command_scope_chat_administrators'
113
117
  require 'telegram/bot/types/bot_command_scope_chat_member'
114
118
  require 'telegram/bot/types/bot_command_scope_chat'
115
119
  require 'telegram/bot/types/bot_command_scope_default'
120
+ require 'telegram/bot/types/sent_web_app_message'
121
+ require 'telegram/bot/types/menu_button_commands'
122
+ require 'telegram/bot/types/menu_button_web_app'
123
+ require 'telegram/bot/types/menu_button_default'
124
+ require 'telegram/bot/types/chat_administrator_rights'
116
125
 
117
126
  Virtus.finalize
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
- VERSION = '0.18.0'.freeze
5
+ VERSION = '0.19.2'
4
6
  end
5
7
  end
data/lib/telegram/bot.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'virtus'
2
4
  require 'logger'
3
5
  require 'json'
@@ -1,4 +1,6 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
 
4
6
  require 'telegram/bot/version'
@@ -17,13 +19,14 @@ Gem::Specification.new do |spec|
17
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
20
  spec.require_paths = ['lib']
19
21
 
22
+ spec.add_dependency 'dry-inflector'
20
23
  spec.add_dependency 'faraday', '~> 1.0'
21
24
  spec.add_dependency 'virtus', '~> 2.0'
22
- spec.add_dependency 'dry-inflector'
23
25
 
24
- spec.add_development_dependency 'rake', '~> 13.0'
25
26
  spec.add_development_dependency 'pry'
26
- spec.add_development_dependency 'rubocop', '~> 0.48.1'
27
+ spec.add_development_dependency 'rake', '~> 13.0'
27
28
  spec.add_development_dependency 'rspec', '~> 3.4'
28
- spec.add_development_dependency 'rubocop-rspec', '~> 1.8'
29
+ spec.add_development_dependency 'rubocop', '~> 1.27'
30
+ spec.add_development_dependency 'rubocop-rake'
31
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
29
32
  end