mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-28 14:59:56 +01:00
Plugin/Wordle: always have last word/guess in info
This commit is contained in:
parent
6ba8776c2c
commit
80bc79cfbc
@ -162,13 +162,16 @@ sub wordle($self, $context) {
|
||||
|
||||
if ($self->{$channel}->{correct}) {
|
||||
my $solved_on = concise ago (time - $self->{$channel}->{solved_on});
|
||||
$result .= "; solved by: $self->{$channel}->{solved_by} ($solved_on)";
|
||||
}
|
||||
|
||||
if ($self->{$channel}->{givenup}) {
|
||||
my $wordle = join '', $self->{$channel}->{wordle}->@*;
|
||||
$result .= "; solved by: $self->{$channel}->{solved_by} ($solved_on); word was: $wordle";
|
||||
} elsif ($self->{$channel}->{givenup}) {
|
||||
my $givenup_on = concise ago (time - $self->{$channel}->{givenup_on});
|
||||
my $wordle = join '', $self->{$channel}->{wordle}->@*;
|
||||
$result .= "; given up by: $self->{$channel}->{givenup_by} ($givenup_on); word was: $wordle";
|
||||
} else {
|
||||
my $guess = $self->{$channel}->{guesses}->[-1];
|
||||
$guess =~ s/[^\pL]//g;
|
||||
$result .= "; last guess: $guess";
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4860,
|
||||
BUILD_REVISION => 4861,
|
||||
BUILD_DATE => "2024-11-27",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user