mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 07:25:10 +00:00
check if send_message is availible
This commit is contained in:
parent
bee9f33022
commit
ec856365ed
11
bashbot.sh
11
bashbot.sh
@ -11,7 +11,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.80-28-g64b4055
|
||||
#### $$VERSION$$ v0.80-29-gbee9f33
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 sucess (hopefully)
|
||||
@ -56,6 +56,7 @@ fi
|
||||
|
||||
ADDONDIR="${BASHBOT_ETC:-./addons}"
|
||||
|
||||
|
||||
RUNUSER="${USER}" # USER is overwritten by bashbot array
|
||||
|
||||
if [ "${SOURCE}" != "yes" ] && [ "$BASHBOT_HOME" = "" ] && ! cd "${RUNDIR}" ; then
|
||||
@ -152,7 +153,8 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# internal functions
|
||||
#################
|
||||
# BASHBOT INTERNAL functions
|
||||
# $1 URL, $2 filename in TMPDIR
|
||||
# outputs final filename
|
||||
download() {
|
||||
@ -577,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}/senMessage.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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user