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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +4 -2
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/README.md +6 -9
- data/lib/telegram/bot/api/endpoints.rb +21 -3
- data/lib/telegram/bot/types/bot_access_settings.rb +12 -0
- data/lib/telegram/bot/types/bot_command.rb +1 -0
- data/lib/telegram/bot/types/bot_subscription_updated.rb +13 -0
- data/lib/telegram/bot/types/chat_full_info.rb +2 -0
- data/lib/telegram/bot/types/chat_join_request.rb +1 -0
- data/lib/telegram/bot/types/chat_member_restricted.rb +1 -0
- data/lib/telegram/bot/types/chat_permissions.rb +1 -0
- data/lib/telegram/bot/types/community.rb +12 -0
- data/lib/telegram/bot/types/community_chat_added.rb +11 -0
- data/lib/telegram/bot/types/community_chat_removed.rb +10 -0
- data/lib/telegram/bot/types/external_reply_info.rb +1 -0
- data/lib/telegram/bot/types/inline_query_result_location.rb +1 -1
- data/lib/telegram/bot/types/input_location_message_content.rb +1 -1
- data/lib/telegram/bot/types/input_media.rb +2 -1
- data/lib/telegram/bot/types/input_media_link.rb +12 -0
- data/lib/telegram/bot/types/input_media_live_photo.rb +18 -0
- data/lib/telegram/bot/types/input_media_location.rb +14 -0
- data/lib/telegram/bot/types/input_media_sticker.rb +13 -0
- data/lib/telegram/bot/types/input_media_venue.rb +19 -0
- data/lib/telegram/bot/types/input_media_voice_note.rb +16 -0
- data/lib/telegram/bot/types/input_message_content.rb +1 -0
- data/lib/telegram/bot/types/input_paid_media.rb +1 -0
- data/lib/telegram/bot/types/input_paid_media_live_photo.rb +13 -0
- data/lib/telegram/bot/types/input_poll_media.rb +21 -0
- data/lib/telegram/bot/types/input_poll_option.rb +1 -0
- data/lib/telegram/bot/types/input_poll_option_media.rb +21 -0
- data/lib/telegram/bot/types/input_rich_block.rb +34 -0
- data/lib/telegram/bot/types/input_rich_block_anchor.rb +12 -0
- data/lib/telegram/bot/types/input_rich_block_animation.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_audio.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_block_quotation.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_collage.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_details.rb +14 -0
- data/lib/telegram/bot/types/input_rich_block_divider.rb +11 -0
- data/lib/telegram/bot/types/input_rich_block_footer.rb +12 -0
- data/lib/telegram/bot/types/input_rich_block_list.rb +12 -0
- data/lib/telegram/bot/types/input_rich_block_list_item.rb +15 -0
- data/lib/telegram/bot/types/input_rich_block_map.rb +16 -0
- data/lib/telegram/bot/types/input_rich_block_mathematical_expression.rb +12 -0
- data/lib/telegram/bot/types/input_rich_block_paragraph.rb +12 -0
- data/lib/telegram/bot/types/input_rich_block_photo.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_preformatted.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_pull_quotation.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_section_heading.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_slideshow.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_table.rb +15 -0
- data/lib/telegram/bot/types/input_rich_block_thinking.rb +12 -0
- data/lib/telegram/bot/types/input_rich_block_video.rb +13 -0
- data/lib/telegram/bot/types/input_rich_block_voice_note.rb +13 -0
- data/lib/telegram/bot/types/input_rich_message.rb +16 -0
- data/lib/telegram/bot/types/input_rich_message_content.rb +11 -0
- data/lib/telegram/bot/types/input_rich_message_media.rb +13 -0
- data/lib/telegram/bot/types/keyboard_button.rb +1 -0
- data/lib/telegram/bot/types/keyboard_button_request_managed_bot.rb +13 -0
- data/lib/telegram/bot/types/link.rb +11 -0
- data/lib/telegram/bot/types/live_photo.rb +18 -0
- data/lib/telegram/bot/types/managed_bot_created.rb +11 -0
- data/lib/telegram/bot/types/managed_bot_updated.rb +12 -0
- data/lib/telegram/bot/types/message.rb +14 -1
- data/lib/telegram/bot/types/paid_media.rb +2 -1
- data/lib/telegram/bot/types/paid_media_live_photo.rb +12 -0
- data/lib/telegram/bot/types/poll.rb +8 -1
- data/lib/telegram/bot/types/poll_answer.rb +1 -0
- data/lib/telegram/bot/types/poll_media.rb +20 -0
- data/lib/telegram/bot/types/poll_option.rb +5 -0
- data/lib/telegram/bot/types/poll_option_added.rb +14 -0
- data/lib/telegram/bot/types/poll_option_deleted.rb +14 -0
- data/lib/telegram/bot/types/prepared_keyboard_button.rb +11 -0
- data/lib/telegram/bot/types/reply_parameters.rb +3 -1
- data/lib/telegram/bot/types/rich_block.rb +34 -0
- data/lib/telegram/bot/types/rich_block_anchor.rb +12 -0
- data/lib/telegram/bot/types/rich_block_animation.rb +14 -0
- data/lib/telegram/bot/types/rich_block_audio.rb +13 -0
- data/lib/telegram/bot/types/rich_block_block_quotation.rb +13 -0
- data/lib/telegram/bot/types/rich_block_caption.rb +12 -0
- data/lib/telegram/bot/types/rich_block_collage.rb +13 -0
- data/lib/telegram/bot/types/rich_block_details.rb +14 -0
- data/lib/telegram/bot/types/rich_block_divider.rb +11 -0
- data/lib/telegram/bot/types/rich_block_footer.rb +12 -0
- data/lib/telegram/bot/types/rich_block_list.rb +12 -0
- data/lib/telegram/bot/types/rich_block_list_item.rb +16 -0
- data/lib/telegram/bot/types/rich_block_map.rb +16 -0
- data/lib/telegram/bot/types/rich_block_mathematical_expression.rb +12 -0
- data/lib/telegram/bot/types/rich_block_paragraph.rb +12 -0
- data/lib/telegram/bot/types/rich_block_photo.rb +14 -0
- data/lib/telegram/bot/types/rich_block_preformatted.rb +13 -0
- data/lib/telegram/bot/types/rich_block_pull_quotation.rb +13 -0
- data/lib/telegram/bot/types/rich_block_section_heading.rb +13 -0
- data/lib/telegram/bot/types/rich_block_slideshow.rb +13 -0
- data/lib/telegram/bot/types/rich_block_table.rb +15 -0
- data/lib/telegram/bot/types/rich_block_table_cell.rb +16 -0
- data/lib/telegram/bot/types/rich_block_thinking.rb +12 -0
- data/lib/telegram/bot/types/rich_block_video.rb +14 -0
- data/lib/telegram/bot/types/rich_block_voice_note.rb +13 -0
- data/lib/telegram/bot/types/rich_message.rb +12 -0
- data/lib/telegram/bot/types/rich_text.rb +38 -0
- data/lib/telegram/bot/types/rich_text_anchor.rb +12 -0
- data/lib/telegram/bot/types/rich_text_anchor_link.rb +13 -0
- data/lib/telegram/bot/types/rich_text_bank_card_number.rb +13 -0
- data/lib/telegram/bot/types/rich_text_bold.rb +12 -0
- data/lib/telegram/bot/types/rich_text_bot_command.rb +13 -0
- data/lib/telegram/bot/types/rich_text_cashtag.rb +13 -0
- data/lib/telegram/bot/types/rich_text_code.rb +12 -0
- data/lib/telegram/bot/types/rich_text_custom_emoji.rb +13 -0
- data/lib/telegram/bot/types/rich_text_date_time.rb +14 -0
- data/lib/telegram/bot/types/rich_text_email_address.rb +13 -0
- data/lib/telegram/bot/types/rich_text_hashtag.rb +13 -0
- data/lib/telegram/bot/types/rich_text_italic.rb +12 -0
- data/lib/telegram/bot/types/rich_text_marked.rb +12 -0
- data/lib/telegram/bot/types/rich_text_mathematical_expression.rb +12 -0
- data/lib/telegram/bot/types/rich_text_mention.rb +13 -0
- data/lib/telegram/bot/types/rich_text_phone_number.rb +13 -0
- data/lib/telegram/bot/types/rich_text_reference.rb +13 -0
- data/lib/telegram/bot/types/rich_text_reference_link.rb +13 -0
- data/lib/telegram/bot/types/rich_text_spoiler.rb +12 -0
- data/lib/telegram/bot/types/rich_text_strikethrough.rb +12 -0
- data/lib/telegram/bot/types/rich_text_subscript.rb +12 -0
- data/lib/telegram/bot/types/rich_text_superscript.rb +12 -0
- data/lib/telegram/bot/types/rich_text_text_mention.rb +13 -0
- data/lib/telegram/bot/types/rich_text_underline.rb +12 -0
- data/lib/telegram/bot/types/rich_text_url.rb +13 -0
- data/lib/telegram/bot/types/sent_guest_message.rb +11 -0
- data/lib/telegram/bot/types/update.rb +3 -0
- data/lib/telegram/bot/types/user.rb +3 -0
- data/lib/telegram/bot/types.rb +6 -0
- data/lib/telegram/bot/version.rb +1 -1
- data/mise.toml +2 -0
- data/rakelib/builders/type_builder.rb +5 -2
- data/rakelib/builders/type_dependencies.rb +45 -0
- data/rakelib/rebuild.rake +4 -1
- 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,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,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,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,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,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,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,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,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
|