From c119638dade4f19c519393d6228cc72835abde30 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Thu, 10 Feb 2022 00:04:22 +0100 Subject: [PATCH] Adding the time to send karma in seconds. --- bin/doctor_karma.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/doctor_karma.pl b/bin/doctor_karma.pl index 5eabdf3..d9775b9 100755 --- a/bin/doctor_karma.pl +++ b/bin/doctor_karma.pl @@ -145,9 +145,11 @@ sub check_can_modify_karma { return 1; } my $last_karma_given_date = $user->last_karma_given_date; + my $time_to_post = $last_karma_given_date->add(minutes => 1) - DateTime->now(); $telegram->send_message( chat_id => $chat_id, - text => "You cannot give karma yet wait a bit until @{[xml_escape($last_karma_given_date.'')]}.", + text => "You cannot give karma yet wait a bit. +@{[xml_escape($time_to_post->seconds)]} seconds to send karma.", ); return 0; }