@@ -3,18 +3,26 @@ use Mojo::Base 'Fenix::Model::Handler::base', -signatures;
3
3
4
4
use Mojo::Promise;
5
5
6
- has priority => 100;
6
+ # default handler, lowest priority.
7
+ # if we get mentioned but don't know what to do we
8
+ # DM the user information about our capabilities
9
+ has priority => 9999;
7
10
has generic => 0;
8
11
has dm => 1;
9
12
10
13
sub process_p ($self , $chan , $from , $msg , $mentioned = 0) {
11
- return undef if !$mentioned || $msg !~ / \b help\b /i ;
14
+ return undef if !$mentioned || $self -> utils-> muted(\$self -> mutemap-> {help }, $from );
15
+
16
+ my $preface = $msg =~ / \b help\b /i
17
+ ? " Hi $from , I am glad you asked!\n "
18
+ . ' To get my attention, just mention my name in a message to the channel.'
19
+ : " Hi $from , it seems that you tried to get my attention.\n "
20
+ . ' However, I am afraid I did not understand your request.' ;
12
21
13
22
return Mojo::Promise-> resolve([ split /\n/, <<"END" ]);
14
- Hi $from , I am glad you asked!
15
- To get my attention, just mention my name in a message to the channel.
23
+ $preface
16
24
I can look up Redmine issues with 'illumos <issue>', 'issue <issue>' or '#<issue>'
17
- For Joyent/ SmartOS issues, use the issue type and number together, e.g. OS-1234.
25
+ For SmartOS issues, use the issue type and number together, e.g. OS-1234.
18
26
I can also find IPDs - 'IPD123', 'IPD-123' or 'IPD 123'
19
27
as well as OpenSolaris issues with a seven digit bug ID. If you want me to, I can also
20
28
dig very deeply and find stuff in the OpenSolaris ARC Material Archive, just use e.g. FWARC/2004/510.
@@ -29,7 +37,7 @@ __END__
29
37
30
38
=head1 COPYRIGHT
31
39
32
- Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
40
+ Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
33
41
34
42
=head1 LICENSE
35
43
0 commit comments