1

Change fields in Chat object

- Removed all_members_are_administrators
+ Add permissions;
+ Add slow_mode_delay;
This commit is contained in:
eleksir
2020-10-30 13:58:37 +03:00
parent 75ee83c94f
commit edcd382183

View File

@@ -4,31 +4,34 @@ package Teapot::Bot::Object::Chat;
use Mojo::Base 'Teapot::Bot::Object::Base'; use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::ChatPhoto; use Teapot::Bot::Object::ChatPhoto;
use Teapot::Bot::Object::Message; use Teapot::Bot::Object::Message;
use Teapot::Bot::Object::ChatPermissions;
$Teapot::Bot::Object::Chat::VERSION = '0.021'; $Teapot::Bot::Object::Chat::VERSION = '0.021';
has 'id'; has 'id';
has 'type'; has 'type';
has 'title'; has 'title'; # Optional.
has 'username'; has 'username'; # Optional.
has 'first_name'; has 'first_name'; # Optional.
has 'last_name'; has 'last_name'; # Optional.
has 'all_members_are_administrators'; has 'photo'; # Teapot::Bot::Object::ChatPhoto. Optional. Returned only in getChat.
has 'photo'; #ChatPhoto has 'description'; # Optional. Returned only in getChat.
has 'description'; has 'invite_link'; # Optional. Returned only in getChat.
has 'invite_link'; has 'pinned_message'; # Teapot::Bot::Object::Message
has 'pinned_message'; #Message has 'permissions'; # Teapot::Bot::Object::ChatPermissions. Optional. Default chat member permissions, for
has 'sticker_set_name'; # groups and supergroups. Returned only in getChat.
has 'can_set_sticker_set'; has 'slow_mode_delay'; # Optional. Returned only in getChat.
has 'sticker_set_name'; # Optional. Returned only in getChat.
has 'can_set_sticker_set'; # Optional. Returned only in getChat.
sub fields { sub fields {
return { return {
'scalar' => [qw/id type title username first_name 'scalar' => [qw/id type title username first_name last_name description
last_name all_members_are_administrators invite_link slow_mode_delay sticker_set_name
description invite_link sticker_set_name
can_set_sticker_set /], can_set_sticker_set /],
'Teapot::Bot::Object::ChatPhoto' => [qw/photo/], 'Teapot::Bot::Object::ChatPhoto' => [qw/photo/],
'Teapot::Bot::Object::Message' => [qw/pinned_message/], 'Teapot::Bot::Object::Message' => [qw/pinned_message/],
'Teapot::Bot::Object::ChatPermissions' => [qw/permissions/],
}; };
} }