updated way of making and sending inline kbd

This commit is contained in:
celso 2023-03-26 09:09:13 -03:00
parent 90a3a4c56e
commit 77b2ffaab8
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit 24c05e35dcefc61b9ce96a4191b31925308ba9f6
Subproject commit d5adbdec110a4e655e28176260255b6f2690a106

10
bot.sh
View File

@ -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