From b024d5f13a92bb9812192725f19764ec90d37afe Mon Sep 17 00:00:00 2001 From: eleksir Date: Fri, 9 May 2025 11:59:18 +0300 Subject: [PATCH] Do not send "Typing" as it cause errors, replace it with sleep. --- lib/TelegramBot.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/TelegramBot.pm b/lib/TelegramBot.pm index da85e1f..006f34d 100644 --- a/lib/TelegramBot.pm +++ b/lib/TelegramBot.pm @@ -18,7 +18,7 @@ use BotLib::Admin qw (FortuneToggleList ChanMsgEnabled GreetMsgEnabled Go MigrateSettingsToNewChatID IsCensored); use BotLib qw (Command); use BotLib::Conf qw (LoadConf); -use BotLib::Util qw (trim fmatch BotSleep Highlight RandomCommonPhrase); +use BotLib::Util qw (trim fmatch Highlight RandomCommonPhrase); use RedisLib qw (redis_events_listener); use version; our $VERSION = qw (1.0); @@ -207,7 +207,7 @@ sub __on_msg { ); } - BotSleep $msg; + sleep 2; my $res = $msg->replyMd ($phrase); if ($res->{error}) { @@ -252,7 +252,7 @@ sub __on_msg { $member, ); - BotSleep $msg; + sleep 2; my $res = $msg->replyMd ($phrase); if ($res->{error}) {