diff --git a/lib/Teapot/Bot/Object/MessageEntity.pm b/lib/Teapot/Bot/Object/MessageEntity.pm index 491b56f..a2b1fbe 100644 --- a/lib/Teapot/Bot/Object/MessageEntity.pm +++ b/lib/Teapot/Bot/Object/MessageEntity.pm @@ -9,13 +9,14 @@ $Teapot::Bot::Object::MessageEntity::VERSION = '0.021'; has 'type'; has 'offset'; has 'length'; -has 'url'; -has 'user'; #User +has 'url'; # Optional. +has 'user'; # Optional. Teapot::Bot::Object::User +has 'language'; # Optional. For “pre” only, the programming language of the entity text sub fields { return { - 'scalar' => [qw/type offset length url/], - 'Teapot::Bot::Object::User' => [qw/user/], + 'scalar' => [qw/type offset length url language/], + 'Teapot::Bot::Object::User' => [qw/user/], }; } diff --git a/lib/Teapot/Bot/Object/User.pm b/lib/Teapot/Bot/Object/User.pm index eeb332d..755cd77 100644 --- a/lib/Teapot/Bot/Object/User.pm +++ b/lib/Teapot/Bot/Object/User.pm @@ -9,12 +9,16 @@ $Teapot::Bot::Object::User::VERSION = '0.021'; has 'id'; has 'is_bot'; has 'first_name'; -has 'last_name'; # optional -has 'username'; # optional -has 'language_code'; # optional +has 'last_name'; # optional +has 'username'; # optional +has 'language_code'; # optional +has 'can_join_groups' # optional, only for getMe() method +has 'can_read_all_group_messages' # optional, only for getMe() method +has 'supports_inline_queries' # optional, only for getMe() method sub fields { - return { scalar => [qw/id is_bot first_name last_name username language_code/] + return { scalar => [qw/id is_bot first_name last_name username language_code can_join_groups + can_read_all_group_messages supports_inline_queries/] }; }