warn if old send_keyboard format is detected

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-08-08 17:58:18 +02:00
parent 9d7f1455e5
commit 682f3941e3
2 changed files with 7 additions and 3 deletions

View File

@ -133,7 +133,10 @@ send_album "$(getConfigKey "botadmin")" "http://www.rrr.de/slider/main-image1.jp
----
##### send_keyboard
Note: since version 0.6 send_keyboard was changed to use native "JSON Array" notation as used from Telegram. Example Keyboard Array definitions:
Note: Since version 0.6 send_keyboard was changed to use native "JSON Array" notation as used from Telegram.
Detection and emulation for old format will be removed after 1.0 release!
Example Keyboard Array definitions:
- yes no in two rows:
- OLD format: 'yes' 'no' (two strings)
@ -1046,5 +1049,5 @@ The name of your bot is available as bash variable "$ME", there is no need to ca
#### [Prev Best Practice](5_practice.md)
#### [Next Notes for Developers](7_develop.md)
#### $$VERSION$$ 0.99-0-g2775000
#### $$VERSION$$ 0.99-17-g9d7f145

View File

@ -5,7 +5,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ 0.99-6-gc4ab7ff
#### $$VERSION$$ 0.99-17-g9d7f145
# will be automatically sourced from bashbot
@ -83,6 +83,7 @@ old_send_keyboard() {
IFS="$OLDIFS"
keyboard="${keyboard/init, /}"
sendJson "${1}" "${text}"', "reply_markup": {"keyboard": [ '"${keyboard}"' ],"one_time_keyboard": true}' "$MSG_URL"
send_normal_message "$(getConfigKey "botadmin")" "Warning: old 'send_keyboard' format is deprecated since version 0.6 and will be removed after 1.0 release!"
}
send_keyboard() {