updated way of making and sending inline kbd
This commit is contained in:
parent
7ba1e2e27e
commit
6db5bff9b9
|
@ -1 +1 @@
|
||||||
Subproject commit d0f9ebf71c143ad7276be54d85d644f614e6d391
|
Subproject commit dc0cf65d2c3e5efd8e5d117118e41e9768116d41
|
10
bot.sh
10
bot.sh
|
@ -18,6 +18,14 @@ exec 2>"${bot_tmpdir}/error.log"
|
||||||
. ./bashbot-lib/bashbot-lib.sh
|
. ./bashbot-lib/bashbot-lib.sh
|
||||||
. ./bashbot-lib/viewer.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
|
while [ "${1}" == "start" ]; do
|
||||||
getupd >/dev/null || continue
|
getupd >/dev/null || continue
|
||||||
declare -A curmsg
|
declare -A curmsg
|
||||||
|
@ -28,7 +36,7 @@ while [ "${1}" == "start" ]; do
|
||||||
[ "${curmsg[callback]}" == "recheck" ] || [ "${curmsg[text]}" == "/start" ]
|
[ "${curmsg[callback]}" == "recheck" ] || [ "${curmsg[text]}" == "/start" ]
|
||||||
} && {
|
} && {
|
||||||
__ip=$(./getip.sh "${bot_tmpdir}")
|
__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
|
unset curmsg
|
||||||
declare -A curmsg
|
declare -A curmsg
|
||||||
getmsg_content curmsg sentmsgs.txt
|
getmsg_content curmsg sentmsgs.txt
|
||||||
|
|
Loading…
Reference in New Issue