mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-31 22:01:46 +00:00
warn if old send_keyboard format is detected
This commit is contained in:
parent
9d7f1455e5
commit
682f3941e3
@ -133,7 +133,10 @@ send_album "$(getConfigKey "botadmin")" "http://www.rrr.de/slider/main-image1.jp
|
|||||||
----
|
----
|
||||||
|
|
||||||
##### send_keyboard
|
##### 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:
|
- yes no in two rows:
|
||||||
- OLD format: 'yes' 'no' (two strings)
|
- 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)
|
#### [Prev Best Practice](5_practice.md)
|
||||||
#### [Next Notes for Developers](7_develop.md)
|
#### [Next Notes for Developers](7_develop.md)
|
||||||
|
|
||||||
#### $$VERSION$$ 0.99-0-g2775000
|
#### $$VERSION$$ 0.99-17-g9d7f145
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# 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
|
# will be automatically sourced from bashbot
|
||||||
|
|
||||||
@ -83,6 +83,7 @@ old_send_keyboard() {
|
|||||||
IFS="$OLDIFS"
|
IFS="$OLDIFS"
|
||||||
keyboard="${keyboard/init, /}"
|
keyboard="${keyboard/init, /}"
|
||||||
sendJson "${1}" "${text}"', "reply_markup": {"keyboard": [ '"${keyboard}"' ],"one_time_keyboard": true}' "$MSG_URL"
|
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() {
|
send_keyboard() {
|
||||||
|
Loading…
Reference in New Issue
Block a user