1

Add new fields to User and MessageEntity objects

This commit is contained in:
eleksir
2020-10-29 16:28:43 +03:00
parent 74e58db1b8
commit 1a8fa3e089
2 changed files with 13 additions and 8 deletions

View File

@@ -9,13 +9,14 @@ $Teapot::Bot::Object::MessageEntity::VERSION = '0.021';
has 'type'; has 'type';
has 'offset'; has 'offset';
has 'length'; has 'length';
has 'url'; has 'url'; # Optional.
has 'user'; #User has 'user'; # Optional. Teapot::Bot::Object::User
has 'language'; # Optional. For “pre” only, the programming language of the entity text
sub fields { sub fields {
return { return {
'scalar' => [qw/type offset length url/], 'scalar' => [qw/type offset length url language/],
'Teapot::Bot::Object::User' => [qw/user/], 'Teapot::Bot::Object::User' => [qw/user/],
}; };
} }

View File

@@ -9,12 +9,16 @@ $Teapot::Bot::Object::User::VERSION = '0.021';
has 'id'; has 'id';
has 'is_bot'; has 'is_bot';
has 'first_name'; has 'first_name';
has 'last_name'; # optional has 'last_name'; # optional
has 'username'; # optional has 'username'; # optional
has 'language_code'; # 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 { 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/]
}; };
} }