3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 19:52:34 +01:00

Commands: show how to add help text when help text is missing

This commit is contained in:
Pragmatic Software 2020-05-01 09:55:15 -07:00
parent 1124f4716a
commit e155b2958e

View File

@ -180,7 +180,7 @@ sub help {
my $result = "/say $name: "; my $result = "/say $name: ";
$result .= "[Requires can-$keyword] " if $requires_cap; $result .= "[Requires can-$keyword] " if $requires_cap;
if (not defined $help or not length $help) { $result .= "I have no help for this command yet."; } if (not defined $help or not length $help) { $result .= "I have no help text for this command yet. To add help text, use the command `cmdset $keyword help <text>`."; }
else { $result .= $help; } else { $result .= $help; }
return $result; return $result;
} }
@ -227,7 +227,7 @@ sub help {
my $help = $self->{pbot}->{factoids}->{factoids}->get_data($channel, $trigger, 'help'); my $help = $self->{pbot}->{factoids}->{factoids}->get_data($channel, $trigger, 'help');
if (not defined $help or not length $help) { return "/say $trigger_name is a factoid for $channel_name, but I have no help for it yet."; } if (not defined $help or not length $help) { return "/say $trigger_name is a factoid for $channel_name, but I have no help text for it yet. To add help text, use the command `factset $trigger_name help <text>`."; }
$result .= $help; $result .= $help;
return $result; return $result;