line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Telegram::Bot::Object::Chat; |
2
|
|
|
|
|
|
|
$Telegram::Bot::Object::Chat::VERSION = '0.021'; |
3
|
|
|
|
|
|
|
# ABSTRACT: The base class for Telegram 'Chat' type objects |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
32
|
use Mojo::Base 'Telegram::Bot::Object::Base'; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
29
|
|
7
|
5
|
|
|
5
|
|
2499
|
use Telegram::Bot::Object::ChatPhoto; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
41
|
|
8
|
5
|
|
|
5
|
|
211
|
use Telegram::Bot::Object::Message; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
32
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'id'; |
11
|
|
|
|
|
|
|
has 'type'; |
12
|
|
|
|
|
|
|
has 'title'; |
13
|
|
|
|
|
|
|
has 'username'; |
14
|
|
|
|
|
|
|
has 'first_name'; |
15
|
|
|
|
|
|
|
has 'last_name'; |
16
|
|
|
|
|
|
|
has 'all_members_are_administrators'; |
17
|
|
|
|
|
|
|
has 'photo'; #ChatPhoto |
18
|
|
|
|
|
|
|
has 'description'; |
19
|
|
|
|
|
|
|
has 'invite_link'; |
20
|
|
|
|
|
|
|
has 'pinned_message'; #Message |
21
|
|
|
|
|
|
|
has 'sticker_set_name'; |
22
|
|
|
|
|
|
|
has 'can_set_sticker_set'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub fields { |
25
|
|
|
|
|
|
|
return { |
26
|
12
|
|
|
12
|
0
|
78
|
'scalar' => [qw/id type title username first_name |
27
|
|
|
|
|
|
|
last_name all_members_are_administrators |
28
|
|
|
|
|
|
|
description invite_link sticker_set_name |
29
|
|
|
|
|
|
|
can_set_sticker_set/], |
30
|
|
|
|
|
|
|
'Telegram::Bot::Object::ChatPhoto' => [qw/photo/], |
31
|
|
|
|
|
|
|
'Telegram::Bot::Object::Message' => [qw/pinned_message/], |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub is_user { |
37
|
0
|
|
|
0
|
1
|
|
shift->id > 0; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub is_group { |
42
|
0
|
|
|
0
|
1
|
|
shift->id < 0; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |