implemented callback detection and response
This commit is contained in:
parent
ef20b23401
commit
02f43b6665
|
@ -1 +1 @@
|
|||
Subproject commit b2f3e46713fa6fd78f62b37477aa4376fb301b54
|
||||
Subproject commit 1da6cf48d392c430a5ef852c82c90984df636ada
|
6
bot.sh
6
bot.sh
|
@ -19,12 +19,14 @@ exec 2>"${bot_tmpdir}/error.log"
|
|||
. ./bashbot-lib/viewer.sh
|
||||
|
||||
while [ "${1}" == "start" ]; do
|
||||
grep "\S" <<< $(getupd) >/dev/null || continue
|
||||
getupd >/dev/null || continue
|
||||
declare -A curmsg
|
||||
getmsg_content curmsg updates.txt
|
||||
view_content curmsg
|
||||
for i in $(awk '{print $1}' ./allowed_ids.txt); do
|
||||
[ "${curmsg[user_id]}" == "${i}" ] && [ "${curmsg[text]}" == "/start" ] && {
|
||||
[ "${curmsg[user_id]}" == "${i}" ] && {
|
||||
[ "${curmsg[callback]}" == "recheck" ] || [ "${curmsg[text]}" == "/start" ]
|
||||
} && {
|
||||
sendmsg "${curmsg[chat_id]}" $(./getip.sh "${bot_tmpdir}")
|
||||
unset curmsg
|
||||
declare -A curmsg
|
||||
|
|
Loading…
Reference in New Issue