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