mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-05-29 16:30:52 +00:00
load modules before commands.sh
This commit is contained in:
parent
85a178d68a
commit
127cc85a2a
15
bashbot.sh
15
bashbot.sh
|
@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb
|
||||||
# 8 - curl/wget missing
|
# 8 - curl/wget missing
|
||||||
# 10 - not bash!
|
# 10 - not bash!
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.31-dev-1-g62378f7
|
#### $$VERSION$$ v1.31-dev-12-g85a178d
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# emmbeded system may claim bash but it is not
|
# emmbeded system may claim bash but it is not
|
||||||
|
@ -342,6 +342,13 @@ declare -Ax SERVICE NEWMEMBER LEFTMEMBER PINNED MIGRATE
|
||||||
export res CAPTION ME
|
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
|
# read commands file if we are not sourced
|
||||||
COMMANDS="${BASHBOT_ETC:-.}/commands.sh"
|
COMMANDS="${BASHBOT_ETC:-.}/commands.sh"
|
||||||
|
@ -353,12 +360,6 @@ else
|
||||||
fi
|
fi
|
||||||
debug_checks "start SOURCE=${SOURCE:-no}" "$@"
|
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
|
# BASHBOT INTERNAL functions
|
||||||
|
|
|
@ -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")"
|
send_inline_keyboard "${CHAT[ID]}" "Best Dealz!" "$(_button_row "Visit my Shop|https://dealz.rrr.de")"
|
||||||
|
|
||||||
# one button row
|
# 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
|
# 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")"
|
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)
|
#### [Prev Best Practice](5_practice.md)
|
||||||
#### [Next Notes for Developers](7_develop.md)
|
#### [Next Notes for Developers](7_develop.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v1.31-dev-11-gf6e319c
|
#### $$VERSION$$ v1.31-dev-12-g85a178d
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user