bin: bashbot_env: set ME

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-02-01 16:30:04 +01:00
parent 3a29a9dc4a
commit 9ce139a689
3 changed files with 5 additions and 4 deletions

View File

@ -391,6 +391,6 @@ It features background tasks and interactive chats, and can serve as an interfac
<p>@Gnadelwartz</p>
<h2>That's it all guys!</h2>
<p>If you feel that there's something missing or if you found a bug, feel free to submit a pull request!</p>
<h4>$$VERSION$$ v1.32-dev-9-g13052f0</h4>
<h4>$$VERSION$$ v1.40-dev-29-g737be16</h4>
</body>
</html>

View File

@ -315,5 +315,5 @@ That's it all guys!
If you feel that there's something missing or if you found a bug, feel free to submit a
pull request!
$$VERSION$$ v1.32-dev-9-g13052f0
$$VERSION$$ v1.40-dev-29-g737be16

View File

@ -13,12 +13,12 @@
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 18.12.2020 12:27
#
#### $$VERSION$$ v1.40-dev-27-gc4d100e
#### $$VERSION$$ v1.40-dev-30-g3a29a9d
#===============================================================================
############
# set where your bashbot lives
export BASHBOT_HOME BASHBOT_ETC BASHBOT_VAR FILE_REGEX
export BASHBOT_HOME BASHBOT_ETC BASHBOT_VAR FILE_REGEX ME
# default: one dir up
BASHBOT_HOME="$(cd "${BASH_SOURCE[0]%/*}" >/dev/null 2>&1 && pwd)/../"
@ -61,6 +61,7 @@ FILE_REGEX="${UPLOADDIR}/.*"
# get and check ADMIN and NAME
BOT_ADMIN="$(getConfigKey "botadmin")"
BOT_NAME="$(getConfigKey "botname")"
ME="${BOT_NAME}"
[[ -z "${BOT_ADMIN}" || "${BOT_ADMIN}" == "?" ]] && printf "%s\n" "${ORANGE}Warning: Botadmin not set, send bot command${NC} /start"
[[ -z "${BOT_NAME}" ]] && printf "%s\n" "${ORANGE}Warning: Botname not set, run bashbot.sh botname"