updated way of making and sending inline kbd

This commit is contained in:
celso 2023-03-26 09:09:13 -03:00
parent 7ba1e2e27e
commit 6db5bff9b9
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit d0f9ebf71c143ad7276be54d85d644f614e6d391
Subproject commit dc0cf65d2c3e5efd8e5d117118e41e9768116d41

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