From 77b2ffaab835da3a4ac28b78c96afec7ab45a998 Mon Sep 17 00:00:00 2001 From: celso Date: Sun, 26 Mar 2023 09:09:13 -0300 Subject: [PATCH] updated way of making and sending inline kbd --- bashbot-lib | 2 +- bot.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bashbot-lib b/bashbot-lib index 24c05e3..d5adbde 160000 --- a/bashbot-lib +++ b/bashbot-lib @@ -1 +1 @@ -Subproject commit 24c05e35dcefc61b9ce96a4191b31925308ba9f6 +Subproject commit d5adbdec110a4e655e28176260255b6f2690a106 diff --git a/bot.sh b/bot.sh index dc2c117..dbd6a8f 100755 --- a/bot.sh +++ b/bot.sh @@ -18,6 +18,14 @@ exec 2>"${bot_tmpdir}/error.log" . ./bashbot-lib/bashbot-lib.sh . ./bashbot-lib/viewer.sh +declare -a kbd_rows=( 1 ) +declare -a kbd_text=( "check again" ) +declare -a kbd_data=( "recheck" ) +inline_kbd=$(mkinline_kbd kbd_rows kbd_text kbd_data) +unset kbd_rows +unset kbd_text +unset kbd_data + while [ "${1}" == "start" ]; do getupd >/dev/null || continue declare -A curmsg @@ -28,7 +36,7 @@ while [ "${1}" == "start" ]; do [ "${curmsg[callback]}" == "recheck" ] || [ "${curmsg[text]}" == "/start" ] } && { __ip=$(./getip.sh "${bot_tmpdir}") - sendmsg "${curmsg[chat_id]}" "${__ip}%0Asyncplay: port 60000%0Acstrike: port 64000" + sendmsg "${curmsg[chat_id]}" "${__ip}%0Asyncplay: port 60000%0Acstrike: port 64000" "${inline_kbd}" unset curmsg declare -A curmsg getmsg_content curmsg sentmsgs.txt