diff --git a/bashbot.sh b/bashbot.sh index a01c0d9..8d43d72 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.31-dev-1-g62378f7 +#### $$VERSION$$ v1.31-dev-12-g85a178d ################################################################## # emmbeded system may claim bash but it is not @@ -342,6 +342,13 @@ declare -Ax SERVICE NEWMEMBER LEFTMEMBER PINNED MIGRATE export res CAPTION ME +############### +# load modules +for module in "${MODULEDIR:-.}"/*.sh ; do + # shellcheck source=./modules/aliases.sh + if ! _is_function "$(basename "${module}")" && [ -r "${module}" ]; then source "${module}" "source"; fi +done + ################## # read commands file if we are not sourced COMMANDS="${BASHBOT_ETC:-.}/commands.sh" @@ -353,12 +360,6 @@ else fi debug_checks "start SOURCE=${SOURCE:-no}" "$@" -############### -# load modules -for module in "${MODULEDIR:-.}"/*.sh ; do - # shellcheck source=./modules/aliases.sh - if ! _is_function "$(basename "${module}")" && [ -r "${module}" ]; then source "${module}" "source"; fi -done ##################### # BASHBOT INTERNAL functions diff --git a/doc/6_reference.md b/doc/6_reference.md index a9aceea..7244504 100644 --- a/doc/6_reference.md +++ b/doc/6_reference.md @@ -246,7 +246,7 @@ If `"url"` without text is given, `url` is shown on the button and opened on but send_inline_keyboard "${CHAT[ID]}" "Best Dealz!" "$(_button_row "Visit my Shop|https://dealz.rrr.de")" # one button row -send_inline_keyboard "${CHAT[ID]}" "message" "$(_button_row "button 1|"http://rrr.de" "button 2|http://rrr.de")" +send_inline_keyboard "${CHAT[ID]}" "message" "$(_button_row "button 1|http://rrr.de" "button 2|http://rrr.de")" # multiple button rows send_inline_keyboard "${CHAT[ID]}" "message" "$(_button_row "b1|http://rrr.de" "b2|http://rrr.de" "" "b3|http://rrr.de" "b4|http://rrr.de")" @@ -1291,5 +1291,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$$ v1.31-dev-11-gf6e319c +#### $$VERSION$$ v1.31-dev-12-g85a178d diff --git a/test/d-send_message-test/d-send_message-test.result b/test/d-send_message-test/d-send_message-test.result index 3399681..e0f1017 100644 --- a/test/d-send_message-test/d-send_message-test.result +++ b/test/d-send_message-test/d-send_message-test.result @@ -34,10 +34,10 @@ URL:https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?12345 chat:123456 JSON:"text":"\# test for new inline button" URL:https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?123456789:BASHBOTTESTSCRIPTbashbottestscript_/sendMessage -chat:123456 JSON:"text":"Text plus keyboard will appear in chat", "reply_markup": {"inline_keyboard": [ [ {"text":"Button Text", "url":"https://www..."}] ]} +chat:123456 JSON:"text":"Text plus keyboard will appear in chat", "reply_markup": {"inline_keyboard": [ [{"text":"Button Text", "url":"https://www..."}] ]} URL:https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?123456789:BASHBOTTESTSCRIPTbashbottestscript_/sendMessage -chat:123456 JSON:"text":"STABILO 88\/240 Fineliner point 88\n\n[https:\/\/images\-na\.ssl\-images\-amazon\.com\/images\/I\/41oypA3kmHL\.l_SX300\.jpg]\nsecond part of text\nplus newline\.", "reply_markup": {"inline_keyboard": [ [ {"text":"Bei Amazon ansehen \.\.\.", "url":"https://www.amazon.de/dp/B014TN3JYW"}] ]} +chat:123456 JSON:"text":"STABILO 88\/240 Fineliner point 88\n\n[https:\/\/images\-na\.ssl\-images\-amazon\.com\/images\/I\/41oypA3kmHL\.l_SX300\.jpg]\nsecond part of text\nplus newline\.", "reply_markup": {"inline_keyboard": [ [{"text":"Bei Amazon ansehen \.\.\.", "url":"https://www.amazon.de/dp/B014TN3JYW"}] ]} URL:https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?123456789:BASHBOTTESTSCRIPTbashbottestscript_/sendMessage chat:123456 JSON:"text":"\# test for sendfile"