line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Telebot::Command::bot; |
2
|
1
|
|
|
1
|
|
1240
|
use Mojo::Base 'Mojolicious::Commands'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
has description => 'Telebot commands'; |
5
|
|
|
|
|
|
|
has hint => <
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
See 'APPLICATION telebot help' for more information on a specific command. |
8
|
|
|
|
|
|
|
EOF |
9
|
|
|
|
|
|
|
has message => sub { shift->extract_usage . "\nCommands:\n" }; |
10
|
|
|
|
|
|
|
has namespaces => sub { ['Telebot::Command::bot'] }; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
0
|
1
|
|
sub help { shift->run(@_) } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
1; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=encoding utf8 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Telebot::Command::bot - Telebot command |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Usage: APPLICATION telebot COMMAND [OPTIONS] |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
telebot bot generate |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
L lists available generators. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
This is a core command, that means it is always enabled and its code a good example for learning to build new commands, |
33
|
|
|
|
|
|
|
you're welcome to fork it. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
See L for a list of commands that are available by default. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
L inherits all attributes from L and implements the |
40
|
|
|
|
|
|
|
following new ones. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 description |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $description = $generator->description; |
45
|
|
|
|
|
|
|
$generator = $generator->description('Foo'); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Short description of this command, used for the command list. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 hint |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $hint = $generator->hint; |
52
|
|
|
|
|
|
|
$generator = $generator->hint('Foo'); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Short hint shown after listing available generator commands. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 message |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $msg = $generator->message; |
59
|
|
|
|
|
|
|
$generator = $generator->message('Bar'); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Short usage message shown before listing available generator commands. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 namespaces |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $namespaces = $generator->namespaces; |
66
|
|
|
|
|
|
|
$generator = $generator->namespaces(['MyApp::Command::generate']); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Namespaces to search for available generator commands, defaults to L. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 METHODS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L inherits all methods from L and implements the |
73
|
|
|
|
|
|
|
following new ones. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 help |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
$generator->help('app'); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Print usage information for generator command. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SEE ALSO |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
L, L, L. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |