diff --git a/mycommands.sh b/mycommands.sh index 8538172..d877028 100644 --- a/mycommands.sh +++ b/mycommands.sh @@ -13,7 +13,7 @@ # License: WTFPLv2 http://www.wtfpl.net/txt/copying/ # Author: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.35-dev-14-g08a0524 +#### $$VERSION$$ v1.35-dev-20-gfa0cb75 ####################################################### # shellcheck disable=SC1117 @@ -203,8 +203,11 @@ else return ;; *) # all other callbacks are processed here - : # your processing here ... - : + # your processing here ... + if [[ -n "${iBUTTON[CHAT_ID]}" && -n "${iBUTTON[MESSAGE_ID]}" ]]; then + # output random button if message data is available + edit_inline_buttons "${iBUTTON[CHAT_ID]}" "${iBUTTON[MESSAGE_ID]}" "Button ${RANDOM}|${RANDOM}" + fi # Telegram needs an ack each callback query, default empty answer_callback_query "${iBUTTON[ID]}" "" ;; diff --git a/mycommands.sh.clean b/mycommands.sh.clean index 9ae73e2..9f3de30 100644 --- a/mycommands.sh.clean +++ b/mycommands.sh.clean @@ -10,7 +10,7 @@ # License: WTFPLv2 http://www.wtfpl.net/txt/copying/ # Author: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.35-dev-18-ge4ee880 ####################################################### # shellcheck disable=SC1117 @@ -77,6 +77,18 @@ else esac } + mycallbacks() { + ####################### + # callbacks from buttons attached to messages will be processed here + case "${iBUTTON[USER_ID]}+${iBUTTON[CHAT_ID]}" in + *) # all other callbacks are processed here + : # your processing here ... + : + # Telegram needs an ack each callback query, default empty + answer_callback_query "${iBUTTON[ID]}" "" + ;; + esac + } myinlines() { ####################### # this fuinction is called only if you has set INLINE=1 !!