diff --git a/lib/Teapot/Bot/Object/Animation.pm b/lib/Teapot/Bot/Object/Animation.pm index 56706a2..ec27b75 100644 --- a/lib/Teapot/Bot/Object/Animation.pm +++ b/lib/Teapot/Bot/Object/Animation.pm @@ -16,7 +16,7 @@ has 'file_unique_id'; has 'width'; has 'height'; has 'duration'; -has 'thumb'; #PhotoSize +has 'thumbnail'; #PhotoSize has 'file_name'; has 'mime_type'; has 'file_size'; @@ -24,7 +24,7 @@ has 'file_size'; sub fields { return { scalar => [qw/file_id file_unique_id width height duration file_name mime_type file_size/], - 'Teapot::Bot::Object::PhotoSize' => [qw/thumb/], + 'Teapot::Bot::Object::PhotoSize' => [qw/thumbnail/], }; } diff --git a/lib/Teapot/Bot/Object/Audio.pm b/lib/Teapot/Bot/Object/Audio.pm index a73efb8..43cf5fc 100644 --- a/lib/Teapot/Bot/Object/Audio.pm +++ b/lib/Teapot/Bot/Object/Audio.pm @@ -7,7 +7,7 @@ use 5.018; ## no critic (ProhibitImplicitImport) use utf8; use Mojo::Base 'Teapot::Bot::Object::Base'; - +use Teapot::Bot::Object::PhotoSize (); $Teapot::Bot::Object::Audio::VERSION = '0.025'; has 'file_id'; @@ -18,12 +18,12 @@ has 'title'; # Optional. Title of the audio as defined by sender or by audio has 'file_name'; # Optional. Original filename as defined by sender has 'mime_type'; # Optional. MIME type of the file as defined by sender has 'file_size'; # Optional. File size -has 'thumb'; # Optional. Thumbnail of the album cover to which the music file belongs +has 'thumbnail'; # Optional. Thumbnail of the album cover to which the music file belongs sub fields { return { scalar => [qw/file_id file_unique_id duration performer title file_name mime_type file_size/], - 'Teapot::Bot::Object::PhotoSize' => [qw/thumb/], + 'Teapot::Bot::Object::PhotoSize' => [qw/thumbnail/], }; } diff --git a/lib/Teapot/Bot/Object/Chat.pm b/lib/Teapot/Bot/Object/Chat.pm index b940ff0..71463e6 100644 --- a/lib/Teapot/Bot/Object/Chat.pm +++ b/lib/Teapot/Bot/Object/Chat.pm @@ -30,6 +30,13 @@ has 'bio'; # Optional. Bio of the other party in a private has 'has_private_forwards'; # Optional. True, if privacy settings of the other party in the private chat allows to # use tg://user?id= links only in chats with the user. # Returned only in getChat. +has 'has_restricted_voice_and_video_messages'; # Optional. True, if the privacy settings of the other party restrict + # sending voice and video note messages in the private chat. + # Returned only in getChat. +has 'join_to_send_messages'; # Optional. True, if users need to join the supergroup before they can send messages. + # Returned only in getChat. +has 'join_by_request' # Optional. True, if all users directly joining the supergroup need to be approved by + # supergroup administrators. Returned only in getChat. has 'description'; # Optional. Returned only in getChat. has 'invite_link'; # Optional. Returned only in getChat. has 'pinned_message'; # Teapot::Bot::Object::Message @@ -53,10 +60,12 @@ sub fields { return { 'scalar' => [qw/id type title username first_name last_name is_forum emoji_status_custom_emoji_id bio - has_private_forwards description invite_link slow_mode_delay - message_auto_delete_time has_aggressive_anti_spam_enabled - has_hidden_members has_protected_content sticker_set_name - can_set_sticker_set linked_chat_id/], + has_private_forwards has_restricted_voice_and_video_messages + join_to_send_messages join_by_request description invite_link + slow_mode_delay message_auto_delete_time + has_aggressive_anti_spam_enabled has_hidden_members + has_protected_content sticker_set_name can_set_sticker_set + linked_chat_id/], 'Teapot::Bot::Object::ChatPhoto' => [qw/photo/], 'Teapot::Bot::Object::Message' => [qw/pinned_message/], 'Teapot::Bot::Object::ChatPermissions' => [qw/permissions/], diff --git a/lib/Teapot/Bot/Object/Document.pm b/lib/Teapot/Bot/Object/Document.pm index f582415..5cf74f2 100644 --- a/lib/Teapot/Bot/Object/Document.pm +++ b/lib/Teapot/Bot/Object/Document.pm @@ -13,7 +13,7 @@ $Teapot::Bot::Object::Document::VERSION = '0.025'; has 'file_id'; has 'file_unique_id'; -has 'thumb'; #PhotoSize +has 'thumbnail'; #PhotoSize has 'file_name'; has 'mime_type'; has 'file_size'; @@ -21,7 +21,7 @@ has 'file_size'; sub fields { return { scalar => [qw/file_id file_unique_id file_name mime_type file_size/], - 'Teapot::Bot::Object::PhotoSize' => [qw/thumb/], + 'Teapot::Bot::Object::PhotoSize' => [qw/thumbnail/], }; } diff --git a/lib/Teapot/Bot/Object/Sticker.pm b/lib/Teapot/Bot/Object/Sticker.pm index 90f7c23..23e6b7c 100644 --- a/lib/Teapot/Bot/Object/Sticker.pm +++ b/lib/Teapot/Bot/Object/Sticker.pm @@ -14,20 +14,26 @@ $Teapot::Bot::Object::Sticker::VERSION = '0.025'; has 'file_id'; has 'file_unique_id'; +has 'type'; has 'width'; has 'height'; has 'is_animated'; has 'is_video'; -has 'thumb'; # PhotoSize +has 'thumbnail'; # PhotoSize has 'emoji'; has 'set_name'; +has 'premium_animation'; has 'mask_position'; +has 'custom_emoji_id'; +has 'needs_repainting'; has 'file_size'; sub fields { return { - scalar => [ qw/file_id file_unique_id width height is_animated is_video emoji set_name file_size/ ], - 'Teapot::Bot::Object::PhotoSize' => [ qw/thumb/ ], + scalar => [ qw/file_id file_unique_id type width height is_animated is_video emoji + set_name premium_animation custom_emoji_id needs_repainting + file_size/ ], + 'Teapot::Bot::Object::PhotoSize' => [ qw/thumbnail/ ], 'Teapot::Bot::Object::MaskPosition' => [qw/mask_position/], }; } diff --git a/lib/Teapot/Bot/Object/Video.pm b/lib/Teapot/Bot/Object/Video.pm index 10f258e..6402080 100644 --- a/lib/Teapot/Bot/Object/Video.pm +++ b/lib/Teapot/Bot/Object/Video.pm @@ -16,7 +16,7 @@ has 'file_unique_id'; has 'width'; has 'height'; has 'duration'; -has 'thumb'; # Optional. Video thumbnail +has 'thumbnail'; # Optional. Video thumbnail has 'file_name'; # Optional. Original filename as defined by sender has 'mime_type'; # Optional. Mime type of a file as defined by sender has 'file_size'; # Optional. File size @@ -25,7 +25,7 @@ sub fields { return { scalar => [qw/file_id file_unique_id width height duration file_name mime_type file_size/], - 'Teapot::Bot::Object::PhotoSize' => [qw/thumb/], + 'Teapot::Bot::Object::PhotoSize' => [qw/thumbnail/], }; }