From ba455af9f1a0c1218248ec1660764d589f68242a Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Fri, 19 Apr 2019 18:35:51 +0200 Subject: [PATCH] fix getting message count --- bashbot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashbot.sh b/bashbot.sh index 8376553..6667cf9 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -637,7 +637,7 @@ while [ "$1" = "startbot" ]; do { UPDATE="$(curl -s "$UPD_URL$OFFSET" | ./JSON.sh/JSON.sh)" # Offset - OFFSET="$(echo "$UPDATE" | JsonGetValue '"result",[0-9]*,"update_id"')" + OFFSET="$(echo "$UPDATE" | grep '\["result",[0-9]*,"update_id"\]' | tail -1 | cut -f 2)" OFFSET=$((OFFSET+1)) if [ "$OFFSET" != "1" ]; then