| 1 | package Telegram::Bot::Object::ChatMemberUpdated; | ||
| 2 | 2 | $Telegram::Bot::Object::ChatMemberUpdated::VERSION = '0.029'; | |
| 3 | # ABSTRACT: The base class for the Telegram type "ChatMemberUpdated". | ||
| 4 | |||
| 5 | |||
| 6 | 2 | ▶ | use Mojo::Base 'Telegram::Bot::Object::Base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | ▶ | use Telegram::Bot::Object::ChatMember; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | ▶ | use Data::Dumper; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | # basic message stuff | ||
| 13 | |||
| 14 | 2 | has 'chat'; # Chat | |
| 15 | 2 | has 'from'; # User | |
| 16 | 2 | has 'date'; # Integer | |
| 17 | 2 | has 'new_chat_member'; # ChatMember | |
| 18 | 2 | has 'old_chat_member'; # ChatMember | |
| 19 | 2 | has 'invite_link'; # ChatInviteLink | |
| 20 | 2 | has 'via_join_request'; # boolean | |
| 21 | 2 | has 'via_chat_folder_invite_link'; # boolean | |
| 22 | |||
| 23 | 0 | ▶ | sub fields { |
|
Subroutine
fields: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 24 | return { | ||
| 25 | 0 | 'scalar' => [qw/date via_join_request via_chat_folder_invite_link/], | |
| 26 | 'Telegram::Bot::Object::User' => [qw/from/], | ||
| 27 | 'Telegram::Bot::Object::Chat' => [qw/chat/], | ||
| 28 | 'Telegram::Bot::Object::ChatMember' => [qw/new_chat_member old_chat_member /], | ||
| 29 | }; | ||
| 30 | } | ||
| 31 | |||
| 32 | 0 | ▶ | sub arrays { |
|
Subroutine
arrays: not called CC=1 SCAR=0.0
Pod
documented
| |||
| 33 | } | ||
| 34 | |||
| 35 | |||
| 36 | 0 | ▶ | sub approve { |
|
Subroutine
approve: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 37 | 0 | my $self = shift; | |
| 38 | 0 | my $text = shift; | |
| 39 | 0 | return $self->_brain->approveChatMemberUpdated({chat_id => $self->chat->id, user_id => $self->from->id}); | |
| 40 | } | ||
| 41 | |||
| 42 | 0 | ▶ | sub decline { |
|
Subroutine
decline: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 43 | 0 | my $self = shift; | |
| 44 | 0 | my $text = shift; | |
| 45 | 0 | return $self->_brain->declineChatMemberUpdated({chat_id => $self->chat->id, user_id => $self->from->id}); | |
| 46 | } | ||
| 47 | |||
| 48 | 2 | 1; | |
| 49 | |||
| 50 | __END__ | ||