From 483da5a7978de5a911fb19fc3afb2a11ca3e69ee Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sun, 26 May 2019 17:03:58 +0200 Subject: [PATCH] finally fix send_message test --- bashbot.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 0180709..1cfa77c 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -579,6 +579,11 @@ bot_init() { fi } +if ! _is_function send_message ; then + echo -e "${RED}ERROR: send_message is not availible, did you deactivate ${MODULEDIR}/sendMessage.sh?${NC}" + exit 1 +fi + JSONSHFILE="${BASHBOT_JSONSH:-${RUNDIR}/JSON.sh/JSON.sh}" [[ "${JSONSHFILE}" != *"/JSON.sh" ]] && echo -e "${RED}ERROR: \"${JSONSHFILE}\" ends not with \"JSONS.sh\".${NC}" && exit 3 @@ -595,10 +600,6 @@ if [ "${SOURCE}" != "yes" ] && [ "$1" != "init" ] && [ "$1" != "help" ] && [ "$ echo -e "${RED}ERROR: Can't connect to Telegram Bot! May be your TOKEN is invalid ...${NC}" exit 1 fi - if _is_function send_message ; then - echo -e "${RED}ERROR: send_message is not availible, did you deactivate ${MODULEDIR}/senMessage.sh?${NC}" - exit 1 - fi fi # source the script with source as param to use functions in other scripts