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 '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/],
};
}

View File

@@ -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/]
};
}