load modules before commands.sh

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-01-20 18:20:03 +01:00
parent 85a178d68a
commit 127cc85a2a
3 changed files with 12 additions and 11 deletions

View File

@ -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

View File

@ -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