telegram-bot-types 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +14 -1
- data/.travis.yml +1 -1
- data/CHANGELOG.md +12 -0
- data/Gemfile +2 -0
- data/README.md +1 -1
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/bin/install_git_hooks +2 -1
- data/lib/telegram/bot/types/animation.rb +6 -0
- data/lib/telegram/bot/types/audio.rb +5 -0
- data/lib/telegram/bot/types/base.rb +31 -5
- data/lib/telegram/bot/types/callback_game.rb +2 -0
- data/lib/telegram/bot/types/callback_query.rb +2 -0
- data/lib/telegram/bot/types/chat.rb +6 -0
- data/lib/telegram/bot/types/chat_invite_link.rb +16 -0
- data/lib/telegram/bot/types/chat_location.rb +12 -0
- data/lib/telegram/bot/types/chat_member.rb +12 -4
- data/lib/telegram/bot/types/chat_member_updated.rb +16 -0
- data/lib/telegram/bot/types/chat_permissions.rb +18 -0
- data/lib/telegram/bot/types/chat_photo.rb +4 -0
- data/lib/telegram/bot/types/chosen_inline_result.rb +2 -0
- data/lib/telegram/bot/types/contact.rb +3 -0
- data/lib/telegram/bot/types/dice.rb +12 -0
- data/lib/telegram/bot/types/document.rb +3 -0
- data/lib/telegram/bot/types/encrypted_credentials.rb +13 -0
- data/lib/telegram/bot/types/encrypted_passport_element.rb +20 -0
- data/lib/telegram/bot/types/file.rb +3 -0
- data/lib/telegram/bot/types/force_reply.rb +3 -1
- data/lib/telegram/bot/types/game.rb +4 -2
- data/lib/telegram/bot/types/game_high_score.rb +2 -0
- data/lib/telegram/bot/types/inline_keyboard_button.rb +3 -0
- data/lib/telegram/bot/types/inline_keyboard_markup.rb +3 -1
- data/lib/telegram/bot/types/inline_query.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_article.rb +3 -1
- data/lib/telegram/bot/types/inline_query_result_audio.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_document.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_gif.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_mpeg4_gif.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_photo.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_sticker.rb +3 -1
- data/lib/telegram/bot/types/inline_query_result_cached_video.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_contact.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_document.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_game.rb +3 -1
- data/lib/telegram/bot/types/inline_query_result_gif.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_location.rb +7 -1
- data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +5 -1
- data/lib/telegram/bot/types/inline_query_result_photo.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_venue.rb +6 -1
- data/lib/telegram/bot/types/inline_query_result_video.rb +4 -1
- data/lib/telegram/bot/types/inline_query_result_voice.rb +4 -1
- data/lib/telegram/bot/types/input_contact_message_content.rb +3 -0
- data/lib/telegram/bot/types/input_location_message_content.rb +6 -0
- data/lib/telegram/bot/types/input_media_animation.rb +18 -0
- data/lib/telegram/bot/types/input_media_audio.rb +18 -0
- data/lib/telegram/bot/types/input_media_document.rb +17 -0
- data/lib/telegram/bot/types/input_media_photo.rb +14 -0
- data/lib/telegram/bot/types/input_media_video.rb +18 -0
- data/lib/telegram/bot/types/input_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_text_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_venue_message_content.rb +5 -0
- data/lib/telegram/bot/types/invoice.rb +2 -0
- data/lib/telegram/bot/types/keyboard_button.rb +3 -0
- data/lib/telegram/bot/types/keyboard_button_poll_type.rb +11 -0
- data/lib/telegram/bot/types/labeled_price.rb +2 -0
- data/lib/telegram/bot/types/location.rb +6 -0
- data/lib/telegram/bot/types/login_url.rb +14 -0
- data/lib/telegram/bot/types/mask_position.rb +2 -0
- data/lib/telegram/bot/types/message.rb +22 -4
- data/lib/telegram/bot/types/message_auto_delete_timer_changed.rb +11 -0
- data/lib/telegram/bot/types/message_entity.rb +3 -0
- data/lib/telegram/bot/types/order_info.rb +2 -0
- data/lib/telegram/bot/types/passport_data.rb +12 -0
- data/lib/telegram/bot/types/passport_element_error_data_field.rb +15 -0
- data/lib/telegram/bot/types/passport_element_error_file.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_files.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_front_side.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_reverse_side.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_selfie.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_translation_file.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_translation_files.rb +14 -0
- data/lib/telegram/bot/types/passport_element_error_unspecified.rb +14 -0
- data/lib/telegram/bot/types/passport_file.rb +14 -0
- data/lib/telegram/bot/types/photo_size.rb +3 -0
- data/lib/telegram/bot/types/poll.rb +23 -0
- data/lib/telegram/bot/types/poll_answer.rb +13 -0
- data/lib/telegram/bot/types/poll_option.rb +12 -0
- data/lib/telegram/bot/types/pre_checkout_query.rb +2 -0
- data/lib/telegram/bot/types/proximity_alert_triggered.rb +13 -0
- data/lib/telegram/bot/types/reply_keyboard_markup.rb +6 -4
- data/lib/telegram/bot/types/reply_keyboard_remove.rb +3 -1
- data/lib/telegram/bot/types/response.rb +3 -1
- data/lib/telegram/bot/types/shipping_address.rb +2 -0
- data/lib/telegram/bot/types/shipping_option.rb +3 -1
- data/lib/telegram/bot/types/shipping_query.rb +2 -0
- data/lib/telegram/bot/types/sticker.rb +4 -0
- data/lib/telegram/bot/types/sticker_set.rb +5 -1
- data/lib/telegram/bot/types/successful_payment.rb +2 -0
- data/lib/telegram/bot/types/update.rb +6 -0
- data/lib/telegram/bot/types/user.rb +5 -0
- data/lib/telegram/bot/types/user_profile_photos.rb +3 -1
- data/lib/telegram/bot/types/venue.rb +5 -0
- data/lib/telegram/bot/types/version.rb +3 -1
- data/lib/telegram/bot/types/video.rb +4 -0
- data/lib/telegram/bot/types/video_note.rb +3 -0
- data/lib/telegram/bot/types/voice.rb +3 -0
- data/lib/telegram/bot/types/voice_chat_ended.rb +11 -0
- data/lib/telegram/bot/types/voice_chat_participants_invited.rb +11 -0
- data/lib/telegram/bot/types/voice_chat_started.rb +10 -0
- data/lib/telegram/bot/types/webhook_info.rb +6 -3
- data/lib/telegram/bot/types.rb +12 -72
- data/telegram-bot-types.gemspec +7 -5
- metadata +49 -17
@@ -1,12 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultCachedVoice < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('voice')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :voice_file_id, String
|
8
10
|
attribute :title, String
|
9
11
|
attribute :caption, String
|
12
|
+
attribute :parse_mode, String
|
10
13
|
attribute :reply_markup, InlineKeyboardMarkup
|
11
14
|
attribute :input_message_content, InputMessageContent
|
12
15
|
end
|
@@ -1,12 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultContact < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('contact')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :phone_number, String
|
8
10
|
attribute :first_name, String
|
9
11
|
attribute :last_name, String
|
12
|
+
attribute :vcard, String
|
10
13
|
attribute :reply_markup, InlineKeyboardMarkup
|
11
14
|
attribute :input_message_content, InputMessageContent
|
12
15
|
attribute :thumb_url, String
|
@@ -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 InlineQueryResultDocument < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('document')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :title, String
|
8
10
|
attribute :caption, String
|
11
|
+
attribute :parse_mode, String
|
9
12
|
attribute :document_url, String
|
10
13
|
attribute :mime_type, String
|
11
14
|
attribute :description, String
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultGame < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('game')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :game_short_name, String
|
8
10
|
attribute :reply_markup, InlineKeyboardMarkup
|
@@ -1,14 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultGif < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('gif')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :gif_url, String
|
8
10
|
attribute :gif_width, Integer
|
9
11
|
attribute :gif_height, Integer
|
10
12
|
attribute :gif_duration, Integer
|
11
13
|
attribute :thumb_url, String
|
14
|
+
attribute :thumb_mime_type, String
|
12
15
|
attribute :title, String
|
13
16
|
attribute :caption, String
|
14
17
|
attribute :reply_markup, InlineKeyboardMarkup
|
@@ -1,12 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultLocation < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('location')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :latitude, Float
|
8
10
|
attribute :longitude, Float
|
9
11
|
attribute :title, String
|
12
|
+
attribute :horizontal_accuracy, Float
|
13
|
+
attribute :live_period, Integer
|
14
|
+
attribute :heading, Integer
|
15
|
+
attribute :proximity_alert_radius, Integer
|
10
16
|
attribute :reply_markup, InlineKeyboardMarkup
|
11
17
|
attribute :input_message_content, InputMessageContent
|
12
18
|
attribute :thumb_url, String
|
@@ -1,16 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultMpeg4Gif < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('mpeg4_gif')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :mpeg4_url, String
|
8
10
|
attribute :mpeg4_width, Integer
|
9
11
|
attribute :mpeg4_height, Integer
|
10
12
|
attribute :mpeg4_duration, Integer
|
11
13
|
attribute :thumb_url, String
|
14
|
+
attribute :thumb_mime_type, String
|
12
15
|
attribute :title, String
|
13
16
|
attribute :caption, String
|
17
|
+
attribute :parse_mode, String
|
14
18
|
attribute :reply_markup, InlineKeyboardMarkup
|
15
19
|
attribute :input_message_content, InputMessageContent
|
16
20
|
end
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultPhoto < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('photo')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :photo_url, String
|
8
10
|
attribute :thumb_url, String
|
@@ -11,6 +13,7 @@ module Telegram
|
|
11
13
|
attribute :title, String
|
12
14
|
attribute :description, String
|
13
15
|
attribute :caption, String
|
16
|
+
attribute :parse_mode, String
|
14
17
|
attribute :reply_markup, InlineKeyboardMarkup
|
15
18
|
attribute :input_message_content, InputMessageContent
|
16
19
|
end
|
@@ -1,14 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultVenue < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('venue')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :latitude, Float
|
8
10
|
attribute :longitude, Float
|
9
11
|
attribute :title, String
|
10
12
|
attribute :address, String
|
11
13
|
attribute :foursquare_id, String
|
14
|
+
attribute :foursquare_type, String
|
15
|
+
attribute :google_place_id, String
|
16
|
+
attribute :google_place_type, String
|
12
17
|
attribute :reply_markup, InlineKeyboardMarkup
|
13
18
|
attribute :input_message_content, InputMessageContent
|
14
19
|
attribute :thumb_url, String
|
@@ -1,14 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultVideo < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('video')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :video_url, String
|
8
10
|
attribute :mime_type, String
|
9
11
|
attribute :thumb_url, String
|
10
12
|
attribute :title, String
|
11
13
|
attribute :caption, String
|
14
|
+
attribute :parse_mode, String
|
12
15
|
attribute :video_width, Integer
|
13
16
|
attribute :video_height, Integer
|
14
17
|
attribute :video_duration, Integer
|
@@ -1,12 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InlineQueryResultVoice < Base
|
5
|
-
attribute :type, String
|
7
|
+
attribute :type, String.default('voice')
|
6
8
|
attribute :id, String
|
7
9
|
attribute :voice_url, String
|
8
10
|
attribute :title, String
|
9
11
|
attribute :caption, String
|
12
|
+
attribute :parse_mode, String
|
10
13
|
attribute :voice_duration, Integer
|
11
14
|
attribute :reply_markup, InlineKeyboardMarkup
|
12
15
|
attribute :input_message_content, InputMessageContent
|
@@ -1,9 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class InputLocationMessageContent < InputMessageContent
|
5
7
|
attribute :latitude, Float
|
6
8
|
attribute :longitude, Float
|
9
|
+
attribute :horizontal_accuracy, Float
|
10
|
+
attribute :live_period, Integer
|
11
|
+
attribute :heading, Integer
|
12
|
+
attribute :proximity_alert_radius, Integer
|
7
13
|
end
|
8
14
|
end
|
9
15
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class InputMediaAnimation < Base
|
7
|
+
attribute :type, String.default('animation')
|
8
|
+
attribute :media, String
|
9
|
+
attribute :thumb, String
|
10
|
+
attribute :caption, String
|
11
|
+
attribute :parse_mode, String
|
12
|
+
attribute :width, Integer
|
13
|
+
attribute :height, Integer
|
14
|
+
attribute :duration, Integer
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class InputMediaAudio < Base
|
7
|
+
attribute :type, String.default('audio')
|
8
|
+
attribute :media, String
|
9
|
+
attribute :thumb, String
|
10
|
+
attribute :caption, String
|
11
|
+
attribute :parse_mode, String
|
12
|
+
attribute :duration, Integer
|
13
|
+
attribute :performer, String
|
14
|
+
attribute :title, String
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class InputMediaDocument < Base
|
7
|
+
attribute :type, String.default('document')
|
8
|
+
attribute :media, String
|
9
|
+
attribute :thumb, String
|
10
|
+
attribute :caption, String
|
11
|
+
attribute :parse_mode, String
|
12
|
+
attribute :caption_entities, Array.of(MessageEntity)
|
13
|
+
attribute :disable_content_type_detection, Boolean
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class InputMediaPhoto < Base
|
7
|
+
attribute :type, String.default('photo')
|
8
|
+
attribute :media, String
|
9
|
+
attribute :caption, String
|
10
|
+
attribute :parse_mode, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class InputMediaVideo < Base
|
7
|
+
attribute :type, String.default('video')
|
8
|
+
attribute :media, String
|
9
|
+
attribute :caption, String
|
10
|
+
attribute :parse_mode, String
|
11
|
+
attribute :width, Integer
|
12
|
+
attribute :height, Integer
|
13
|
+
attribute :duration, Integer
|
14
|
+
attribute :supports_streaming, Boolean
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
@@ -7,6 +9,9 @@ module Telegram
|
|
7
9
|
attribute :title, String
|
8
10
|
attribute :address, String
|
9
11
|
attribute :foursquare_id, String
|
12
|
+
attribute :foursquare_type, String
|
13
|
+
attribute :google_place_id, String
|
14
|
+
attribute :google_place_type, String
|
10
15
|
end
|
11
16
|
end
|
12
17
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
@@ -5,6 +7,7 @@ module Telegram
|
|
5
7
|
attribute :text, String
|
6
8
|
attribute :request_contact, Boolean
|
7
9
|
attribute :request_location, Boolean
|
10
|
+
attribute :request_poll, KeyboardButtonPollType
|
8
11
|
end
|
9
12
|
end
|
10
13
|
end
|
@@ -1,9 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class Location < Base
|
5
7
|
attribute :longitude, Float
|
6
8
|
attribute :latitude, Float
|
9
|
+
attribute :horizontal_accuracy, Float
|
10
|
+
attribute :live_period, Integer
|
11
|
+
attribute :heading, Integer
|
12
|
+
attribute :proximity_alert_radius, Integer
|
7
13
|
end
|
8
14
|
end
|
9
15
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class LoginUrl < Base
|
7
|
+
attribute :url, String
|
8
|
+
attribute :forward_text, String
|
9
|
+
attribute :bot_username, String
|
10
|
+
attribute :request_write_access, Boolean
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,46 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
4
6
|
class Message < Base
|
5
7
|
attribute :message_id, Integer
|
6
8
|
attribute :from, User
|
9
|
+
attribute :sender_chat, Chat
|
7
10
|
attribute :date, Integer
|
8
11
|
attribute :chat, Chat
|
9
12
|
attribute :forward_from, User
|
10
13
|
attribute :forward_from_chat, Chat
|
11
14
|
attribute :forward_from_message_id, Integer
|
12
15
|
attribute :forward_signature, String
|
16
|
+
attribute :forward_sender_name, String
|
13
17
|
attribute :forward_date, Integer
|
14
18
|
attribute :reply_to_message, Message
|
19
|
+
attribute :via_bot, User
|
15
20
|
attribute :edit_date, Integer
|
21
|
+
attribute :media_group_id, String
|
16
22
|
attribute :author_signature, String
|
17
23
|
attribute :text, String
|
18
|
-
attribute :entities,
|
24
|
+
attribute :entities, Array.of(MessageEntity)
|
25
|
+
attribute :caption_entities, Array.of(MessageEntity)
|
19
26
|
attribute :audio, Audio
|
20
27
|
attribute :document, Document
|
28
|
+
attribute :animation, Animation
|
21
29
|
attribute :game, Game
|
22
|
-
attribute :photo,
|
30
|
+
attribute :photo, Array.of(PhotoSize)
|
23
31
|
attribute :sticker, Sticker
|
24
32
|
attribute :video, Video
|
25
33
|
attribute :voice, Voice
|
26
34
|
attribute :video_note, VideoNote
|
27
35
|
attribute :caption, String
|
28
36
|
attribute :contact, Contact
|
37
|
+
attribute :dice, Dice
|
29
38
|
attribute :location, Location
|
30
39
|
attribute :venue, Venue
|
31
|
-
attribute :
|
40
|
+
attribute :poll, Poll
|
41
|
+
attribute :new_chat_members, Array.of(User)
|
32
42
|
attribute :left_chat_member, User
|
33
43
|
attribute :new_chat_title, String
|
34
|
-
attribute :new_chat_photo,
|
44
|
+
attribute :new_chat_photo, Array.of(PhotoSize)
|
35
45
|
attribute :delete_chat_photo, Boolean
|
36
46
|
attribute :group_chat_created, Boolean
|
37
47
|
attribute :supergroup_chat_created, Boolean
|
38
48
|
attribute :channel_chat_created, Boolean
|
49
|
+
attribute :message_auto_delete_timer_changed, MessageAutoDeleteTimerChanged
|
39
50
|
attribute :migrate_to_chat_id, Integer
|
40
51
|
attribute :migrate_from_chat_id, Integer
|
41
52
|
attribute :pinned_message, Message
|
42
53
|
attribute :invoice, Invoice
|
43
54
|
attribute :successful_payment, SuccessfulPayment
|
55
|
+
attribute :connected_website, String
|
56
|
+
attribute :passport_data, PassportData
|
57
|
+
attribute :proximity_alert_triggered, ProximityAlertTriggered
|
58
|
+
attribute :voice_chat_started, VoiceChatStarted
|
59
|
+
attribute :voice_chat_ended, VoiceChatEnded
|
60
|
+
attribute :voice_chat_participants_invited, VoiceChatParticipantsInvited
|
61
|
+
attribute :reply_markup, InlineKeyboardMarkup
|
44
62
|
|
45
63
|
alias_method :to_s, :text
|
46
64
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class PassportElementErrorDataField < Base
|
7
|
+
attribute :source, String.default('data')
|
8
|
+
attribute :type, String
|
9
|
+
attribute :field_name, String
|
10
|
+
attribute :data_hash, String
|
11
|
+
attribute :message, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class PassportElementErrorFile < Base
|
7
|
+
attribute :source, String.default('file')
|
8
|
+
attribute :type, String
|
9
|
+
attribute :file_hash, String
|
10
|
+
attribute :message, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class PassportElementErrorFiles < Base
|
7
|
+
attribute :source, String.default('files')
|
8
|
+
attribute :type, String
|
9
|
+
attribute :file_hashes, Array.of(String)
|
10
|
+
attribute :message, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class PassportElementErrorFrontSide < Base
|
7
|
+
attribute :source, String.default('front_side')
|
8
|
+
attribute :type, String
|
9
|
+
attribute :file_hash, String
|
10
|
+
attribute :message, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class PassportElementErrorReverseSide < Base
|
7
|
+
attribute :source, String.default('reverse_side')
|
8
|
+
attribute :type, String
|
9
|
+
attribute :file_hash, String
|
10
|
+
attribute :message, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Telegram
|
4
|
+
module Bot
|
5
|
+
module Types
|
6
|
+
class PassportElementErrorSelfie < Base
|
7
|
+
attribute :source, String.default('selfie')
|
8
|
+
attribute :type, String
|
9
|
+
attribute :file_hash, String
|
10
|
+
attribute :message, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|