telegram-bot-ruby 2.6.0 → 2.8.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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +4 -2
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile +1 -1
  5. data/README.md +6 -9
  6. data/lib/telegram/bot/api/endpoints.rb +21 -3
  7. data/lib/telegram/bot/types/bot_access_settings.rb +12 -0
  8. data/lib/telegram/bot/types/bot_command.rb +1 -0
  9. data/lib/telegram/bot/types/bot_subscription_updated.rb +13 -0
  10. data/lib/telegram/bot/types/chat_full_info.rb +2 -0
  11. data/lib/telegram/bot/types/chat_join_request.rb +1 -0
  12. data/lib/telegram/bot/types/chat_member_restricted.rb +1 -0
  13. data/lib/telegram/bot/types/chat_permissions.rb +1 -0
  14. data/lib/telegram/bot/types/community.rb +12 -0
  15. data/lib/telegram/bot/types/community_chat_added.rb +11 -0
  16. data/lib/telegram/bot/types/community_chat_removed.rb +10 -0
  17. data/lib/telegram/bot/types/external_reply_info.rb +1 -0
  18. data/lib/telegram/bot/types/inline_query_result_location.rb +1 -1
  19. data/lib/telegram/bot/types/input_location_message_content.rb +1 -1
  20. data/lib/telegram/bot/types/input_media.rb +2 -1
  21. data/lib/telegram/bot/types/input_media_link.rb +12 -0
  22. data/lib/telegram/bot/types/input_media_live_photo.rb +18 -0
  23. data/lib/telegram/bot/types/input_media_location.rb +14 -0
  24. data/lib/telegram/bot/types/input_media_sticker.rb +13 -0
  25. data/lib/telegram/bot/types/input_media_venue.rb +19 -0
  26. data/lib/telegram/bot/types/input_media_voice_note.rb +16 -0
  27. data/lib/telegram/bot/types/input_message_content.rb +1 -0
  28. data/lib/telegram/bot/types/input_paid_media.rb +1 -0
  29. data/lib/telegram/bot/types/input_paid_media_live_photo.rb +13 -0
  30. data/lib/telegram/bot/types/input_poll_media.rb +21 -0
  31. data/lib/telegram/bot/types/input_poll_option.rb +1 -0
  32. data/lib/telegram/bot/types/input_poll_option_media.rb +21 -0
  33. data/lib/telegram/bot/types/input_rich_block.rb +34 -0
  34. data/lib/telegram/bot/types/input_rich_block_anchor.rb +12 -0
  35. data/lib/telegram/bot/types/input_rich_block_animation.rb +13 -0
  36. data/lib/telegram/bot/types/input_rich_block_audio.rb +13 -0
  37. data/lib/telegram/bot/types/input_rich_block_block_quotation.rb +13 -0
  38. data/lib/telegram/bot/types/input_rich_block_collage.rb +13 -0
  39. data/lib/telegram/bot/types/input_rich_block_details.rb +14 -0
  40. data/lib/telegram/bot/types/input_rich_block_divider.rb +11 -0
  41. data/lib/telegram/bot/types/input_rich_block_footer.rb +12 -0
  42. data/lib/telegram/bot/types/input_rich_block_list.rb +12 -0
  43. data/lib/telegram/bot/types/input_rich_block_list_item.rb +15 -0
  44. data/lib/telegram/bot/types/input_rich_block_map.rb +16 -0
  45. data/lib/telegram/bot/types/input_rich_block_mathematical_expression.rb +12 -0
  46. data/lib/telegram/bot/types/input_rich_block_paragraph.rb +12 -0
  47. data/lib/telegram/bot/types/input_rich_block_photo.rb +13 -0
  48. data/lib/telegram/bot/types/input_rich_block_preformatted.rb +13 -0
  49. data/lib/telegram/bot/types/input_rich_block_pull_quotation.rb +13 -0
  50. data/lib/telegram/bot/types/input_rich_block_section_heading.rb +13 -0
  51. data/lib/telegram/bot/types/input_rich_block_slideshow.rb +13 -0
  52. data/lib/telegram/bot/types/input_rich_block_table.rb +15 -0
  53. data/lib/telegram/bot/types/input_rich_block_thinking.rb +12 -0
  54. data/lib/telegram/bot/types/input_rich_block_video.rb +13 -0
  55. data/lib/telegram/bot/types/input_rich_block_voice_note.rb +13 -0
  56. data/lib/telegram/bot/types/input_rich_message.rb +16 -0
  57. data/lib/telegram/bot/types/input_rich_message_content.rb +11 -0
  58. data/lib/telegram/bot/types/input_rich_message_media.rb +13 -0
  59. data/lib/telegram/bot/types/keyboard_button.rb +1 -0
  60. data/lib/telegram/bot/types/keyboard_button_request_managed_bot.rb +13 -0
  61. data/lib/telegram/bot/types/link.rb +11 -0
  62. data/lib/telegram/bot/types/live_photo.rb +18 -0
  63. data/lib/telegram/bot/types/managed_bot_created.rb +11 -0
  64. data/lib/telegram/bot/types/managed_bot_updated.rb +12 -0
  65. data/lib/telegram/bot/types/message.rb +14 -1
  66. data/lib/telegram/bot/types/paid_media.rb +2 -1
  67. data/lib/telegram/bot/types/paid_media_live_photo.rb +12 -0
  68. data/lib/telegram/bot/types/poll.rb +8 -1
  69. data/lib/telegram/bot/types/poll_answer.rb +1 -0
  70. data/lib/telegram/bot/types/poll_media.rb +20 -0
  71. data/lib/telegram/bot/types/poll_option.rb +5 -0
  72. data/lib/telegram/bot/types/poll_option_added.rb +14 -0
  73. data/lib/telegram/bot/types/poll_option_deleted.rb +14 -0
  74. data/lib/telegram/bot/types/prepared_keyboard_button.rb +11 -0
  75. data/lib/telegram/bot/types/reply_parameters.rb +3 -1
  76. data/lib/telegram/bot/types/rich_block.rb +34 -0
  77. data/lib/telegram/bot/types/rich_block_anchor.rb +12 -0
  78. data/lib/telegram/bot/types/rich_block_animation.rb +14 -0
  79. data/lib/telegram/bot/types/rich_block_audio.rb +13 -0
  80. data/lib/telegram/bot/types/rich_block_block_quotation.rb +13 -0
  81. data/lib/telegram/bot/types/rich_block_caption.rb +12 -0
  82. data/lib/telegram/bot/types/rich_block_collage.rb +13 -0
  83. data/lib/telegram/bot/types/rich_block_details.rb +14 -0
  84. data/lib/telegram/bot/types/rich_block_divider.rb +11 -0
  85. data/lib/telegram/bot/types/rich_block_footer.rb +12 -0
  86. data/lib/telegram/bot/types/rich_block_list.rb +12 -0
  87. data/lib/telegram/bot/types/rich_block_list_item.rb +16 -0
  88. data/lib/telegram/bot/types/rich_block_map.rb +16 -0
  89. data/lib/telegram/bot/types/rich_block_mathematical_expression.rb +12 -0
  90. data/lib/telegram/bot/types/rich_block_paragraph.rb +12 -0
  91. data/lib/telegram/bot/types/rich_block_photo.rb +14 -0
  92. data/lib/telegram/bot/types/rich_block_preformatted.rb +13 -0
  93. data/lib/telegram/bot/types/rich_block_pull_quotation.rb +13 -0
  94. data/lib/telegram/bot/types/rich_block_section_heading.rb +13 -0
  95. data/lib/telegram/bot/types/rich_block_slideshow.rb +13 -0
  96. data/lib/telegram/bot/types/rich_block_table.rb +15 -0
  97. data/lib/telegram/bot/types/rich_block_table_cell.rb +16 -0
  98. data/lib/telegram/bot/types/rich_block_thinking.rb +12 -0
  99. data/lib/telegram/bot/types/rich_block_video.rb +14 -0
  100. data/lib/telegram/bot/types/rich_block_voice_note.rb +13 -0
  101. data/lib/telegram/bot/types/rich_message.rb +12 -0
  102. data/lib/telegram/bot/types/rich_text.rb +38 -0
  103. data/lib/telegram/bot/types/rich_text_anchor.rb +12 -0
  104. data/lib/telegram/bot/types/rich_text_anchor_link.rb +13 -0
  105. data/lib/telegram/bot/types/rich_text_bank_card_number.rb +13 -0
  106. data/lib/telegram/bot/types/rich_text_bold.rb +12 -0
  107. data/lib/telegram/bot/types/rich_text_bot_command.rb +13 -0
  108. data/lib/telegram/bot/types/rich_text_cashtag.rb +13 -0
  109. data/lib/telegram/bot/types/rich_text_code.rb +12 -0
  110. data/lib/telegram/bot/types/rich_text_custom_emoji.rb +13 -0
  111. data/lib/telegram/bot/types/rich_text_date_time.rb +14 -0
  112. data/lib/telegram/bot/types/rich_text_email_address.rb +13 -0
  113. data/lib/telegram/bot/types/rich_text_hashtag.rb +13 -0
  114. data/lib/telegram/bot/types/rich_text_italic.rb +12 -0
  115. data/lib/telegram/bot/types/rich_text_marked.rb +12 -0
  116. data/lib/telegram/bot/types/rich_text_mathematical_expression.rb +12 -0
  117. data/lib/telegram/bot/types/rich_text_mention.rb +13 -0
  118. data/lib/telegram/bot/types/rich_text_phone_number.rb +13 -0
  119. data/lib/telegram/bot/types/rich_text_reference.rb +13 -0
  120. data/lib/telegram/bot/types/rich_text_reference_link.rb +13 -0
  121. data/lib/telegram/bot/types/rich_text_spoiler.rb +12 -0
  122. data/lib/telegram/bot/types/rich_text_strikethrough.rb +12 -0
  123. data/lib/telegram/bot/types/rich_text_subscript.rb +12 -0
  124. data/lib/telegram/bot/types/rich_text_superscript.rb +12 -0
  125. data/lib/telegram/bot/types/rich_text_text_mention.rb +13 -0
  126. data/lib/telegram/bot/types/rich_text_underline.rb +12 -0
  127. data/lib/telegram/bot/types/rich_text_url.rb +13 -0
  128. data/lib/telegram/bot/types/sent_guest_message.rb +11 -0
  129. data/lib/telegram/bot/types/update.rb +3 -0
  130. data/lib/telegram/bot/types/user.rb +3 -0
  131. data/lib/telegram/bot/types.rb +6 -0
  132. data/lib/telegram/bot/version.rb +1 -1
  133. data/mise.toml +2 -0
  134. data/rakelib/builders/type_builder.rb +5 -2
  135. data/rakelib/builders/type_dependencies.rb +45 -0
  136. data/rakelib/rebuild.rake +4 -1
  137. metadata +107 -2
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockBlockQuotation < Base
7
+ attribute :type, Types::String.constrained(eql: 'blockquote').default('blockquote')
8
+ attribute :blocks, Types::Array.of(Types.deferred(:RichBlock))
9
+ attribute? :credit, RichText
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockCaption < Base
7
+ attribute :text, RichText
8
+ attribute? :credit, RichText
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockCollage < Base
7
+ attribute :type, Types::String.constrained(eql: 'collage').default('collage')
8
+ attribute :blocks, Types::Array.of(Types.deferred(:RichBlock))
9
+ attribute? :caption, RichBlockCaption
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockDetails < Base
7
+ attribute :type, Types::String.constrained(eql: 'details').default('details')
8
+ attribute :summary, RichText
9
+ attribute :blocks, Types::Array.of(Types.deferred(:RichBlock))
10
+ attribute? :is_open, Types::True
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 RichBlockDivider < Base
7
+ attribute :type, Types::String.constrained(eql: 'divider').default('divider')
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 RichBlockFooter < Base
7
+ attribute :type, Types::String.constrained(eql: 'footer').default('footer')
8
+ attribute :text, RichText
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockList < Base
7
+ attribute :type, Types::String.constrained(eql: 'list').default('list')
8
+ attribute :items, Types::Array.of(RichBlockListItem)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockListItem < Base
7
+ attribute :label, Types::String
8
+ attribute :blocks, Types::Array.of(Types.deferred(:RichBlock))
9
+ attribute? :has_checkbox, Types::True
10
+ attribute? :is_checked, Types::True
11
+ attribute? :value, Types::Integer
12
+ attribute? :type, Types::String
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockMap < Base
7
+ attribute :type, Types::String.constrained(eql: 'map').default('map')
8
+ attribute :location, Location
9
+ attribute :zoom, Types::Integer
10
+ attribute :width, Types::Integer
11
+ attribute :height, Types::Integer
12
+ attribute? :caption, RichBlockCaption
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockMathematicalExpression < Base
7
+ attribute :type, Types::String.constrained(eql: 'mathematical_expression').default('mathematical_expression')
8
+ attribute :expression, Types::String
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockParagraph < Base
7
+ attribute :type, Types::String.constrained(eql: 'paragraph').default('paragraph')
8
+ attribute :text, RichText
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockPhoto < Base
7
+ attribute :type, Types::String.constrained(eql: 'photo').default('photo')
8
+ attribute :photo, Types::Array.of(PhotoSize)
9
+ attribute? :has_spoiler, Types::True
10
+ attribute? :caption, RichBlockCaption
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockPreformatted < Base
7
+ attribute :type, Types::String.constrained(eql: 'pre').default('pre')
8
+ attribute :text, RichText
9
+ attribute? :language, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockPullQuotation < Base
7
+ attribute :type, Types::String.constrained(eql: 'pullquote').default('pullquote')
8
+ attribute :text, RichText
9
+ attribute? :credit, RichText
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockSectionHeading < Base
7
+ attribute :type, Types::String.constrained(eql: 'heading').default('heading')
8
+ attribute :text, RichText
9
+ attribute :size, Types::Integer
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockSlideshow < Base
7
+ attribute :type, Types::String.constrained(eql: 'slideshow').default('slideshow')
8
+ attribute :blocks, Types::Array.of(Types.deferred(:RichBlock))
9
+ attribute? :caption, RichBlockCaption
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockTable < Base
7
+ attribute :type, Types::String.constrained(eql: 'table').default('table')
8
+ attribute :cells, Types::Array.of(Types::Array.of(RichBlockTableCell))
9
+ attribute? :is_bordered, Types::True
10
+ attribute? :is_striped, Types::True
11
+ attribute? :caption, RichText
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockTableCell < Base
7
+ attribute? :text, RichText
8
+ attribute? :is_header, Types::True
9
+ attribute? :colspan, Types::Integer
10
+ attribute? :rowspan, Types::Integer
11
+ attribute :align, Types::String
12
+ attribute :valign, Types::String
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockThinking < Base
7
+ attribute :type, Types::String.constrained(eql: 'thinking').default('thinking')
8
+ attribute :text, RichText
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockVideo < Base
7
+ attribute :type, Types::String.constrained(eql: 'video').default('video')
8
+ attribute :video, Video
9
+ attribute? :has_spoiler, Types::True
10
+ attribute? :caption, RichBlockCaption
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichBlockVoiceNote < Base
7
+ attribute :type, Types::String.constrained(eql: 'voice_note').default('voice_note')
8
+ attribute :voice_note, Voice
9
+ attribute? :caption, RichBlockCaption
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichMessage < Base
7
+ attribute :blocks, Types::Array.of(RichBlock)
8
+ attribute? :is_rtl, Types::Bool
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ ## Just for classes consistency
7
+ # rubocop:disable Naming/ConstantName
8
+ RichText = (
9
+ RichTextBold |
10
+ RichTextItalic |
11
+ RichTextUnderline |
12
+ RichTextStrikethrough |
13
+ RichTextSpoiler |
14
+ RichTextDateTime |
15
+ RichTextTextMention |
16
+ RichTextSubscript |
17
+ RichTextSuperscript |
18
+ RichTextMarked |
19
+ RichTextCode |
20
+ RichTextCustomEmoji |
21
+ RichTextMathematicalExpression |
22
+ RichTextUrl |
23
+ RichTextEmailAddress |
24
+ RichTextPhoneNumber |
25
+ RichTextBankCardNumber |
26
+ RichTextMention |
27
+ RichTextHashtag |
28
+ RichTextCashtag |
29
+ RichTextBotCommand |
30
+ RichTextAnchor |
31
+ RichTextAnchorLink |
32
+ RichTextReference |
33
+ RichTextReferenceLink
34
+ )
35
+ # rubocop:enable Naming/ConstantName
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextAnchor < Base
7
+ attribute :type, Types::String.constrained(eql: 'anchor').default('anchor')
8
+ attribute :name, Types::String
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextAnchorLink < Base
7
+ attribute :type, Types::String.constrained(eql: 'anchor_link').default('anchor_link')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :anchor_name, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextBankCardNumber < Base
7
+ attribute :type, Types::String.constrained(eql: 'bank_card_number').default('bank_card_number')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :bank_card_number, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextBold < Base
7
+ attribute :type, Types::String.constrained(eql: 'bold').default('bold')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextBotCommand < Base
7
+ attribute :type, Types::String.constrained(eql: 'bot_command').default('bot_command')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :bot_command, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextCashtag < Base
7
+ attribute :type, Types::String.constrained(eql: 'cashtag').default('cashtag')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :cashtag, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextCode < Base
7
+ attribute :type, Types::String.constrained(eql: 'code').default('code')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextCustomEmoji < Base
7
+ attribute :type, Types::String.constrained(eql: 'custom_emoji').default('custom_emoji')
8
+ attribute :custom_emoji_id, Types::String
9
+ attribute :alternative_text, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextDateTime < Base
7
+ attribute :type, Types::String.constrained(eql: 'date_time').default('date_time')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :unix_time, Types::Integer
10
+ attribute :date_time_format, Types::String
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextEmailAddress < Base
7
+ attribute :type, Types::String.constrained(eql: 'email_address').default('email_address')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :email_address, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextHashtag < Base
7
+ attribute :type, Types::String.constrained(eql: 'hashtag').default('hashtag')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :hashtag, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextItalic < Base
7
+ attribute :type, Types::String.constrained(eql: 'italic').default('italic')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextMarked < Base
7
+ attribute :type, Types::String.constrained(eql: 'marked').default('marked')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextMathematicalExpression < Base
7
+ attribute :type, Types::String.constrained(eql: 'mathematical_expression').default('mathematical_expression')
8
+ attribute :expression, Types::String
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextMention < Base
7
+ attribute :type, Types::String.constrained(eql: 'mention').default('mention')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :username, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextPhoneNumber < Base
7
+ attribute :type, Types::String.constrained(eql: 'phone_number').default('phone_number')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :phone_number, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextReference < Base
7
+ attribute :type, Types::String.constrained(eql: 'reference').default('reference')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :name, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextReferenceLink < Base
7
+ attribute :type, Types::String.constrained(eql: 'reference_link').default('reference_link')
8
+ attribute :text, Types.deferred(:RichText)
9
+ attribute :reference_name, Types::String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextSpoiler < Base
7
+ attribute :type, Types::String.constrained(eql: 'spoiler').default('spoiler')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextStrikethrough < Base
7
+ attribute :type, Types::String.constrained(eql: 'strikethrough').default('strikethrough')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class RichTextSubscript < Base
7
+ attribute :type, Types::String.constrained(eql: 'subscript').default('subscript')
8
+ attribute :text, Types.deferred(:RichText)
9
+ end
10
+ end
11
+ end
12
+ end