Adding how much you have to wait to give karma again.

This commit is contained in:
sergiotarxz 2022-02-09 23:52:50 +01:00
parent fed08e2271
commit 1d6af96d00
2 changed files with 3 additions and 2 deletions

View File

@ -144,9 +144,10 @@ sub check_can_modify_karma {
);
return 1;
}
my $last_karma_given_date = $user->last_karma_given_date;
$telegram->send_message(
chat_id => $chat_id,
text => "You cannot give karma yet wait a bit.",
text => "You cannot give karma yet wait a bit until <b>@{[xml_escape($last_karma_given_date.'')]}</b>.",
);
return 0;
}

View File

@ -81,7 +81,7 @@ sub id_user {
if ( defined $last_karma_given_date ) {
$self->{last_karma_given_date} = $last_karma_given_date;
}
return $self->{last_karma_given_date};
return $self->{last_karma_given_date}->clone;
}
}