Merge pull request #150 from dcoomber/develop

Updated references from `bas` to `bash` and other cosmetic changes to docs
This commit is contained in:
Kay Marquardt 2020-09-06 20:58:04 +02:00 committed by GitHub
commit 9b3d689b9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 17 deletions

View File

@ -633,8 +633,8 @@ process_client() {
jssh_countKeyDB_async "${CHAT[ID]}" "${COUNTFILE}"
}
declare -Ax BASBOT_EVENT_INLINE BASBOT_EVENT_MESSAGE BASHBOT_EVENT_CMD BASBOT_EVENT_REPLY BASBOT_EVENT_FORWARD BASHBOT_EVENT_SEND
declare -Ax BASBOT_EVENT_CONTACT BASBOT_EVENT_LOCATION BASBOT_EVENT_FILE BASHBOT_EVENT_TEXT BASHBOT_EVENT_TIMER BASHBOT_BLOCKED
declare -Ax BASHBOT_EVENT_INLINE BASHBOT_EVENT_MESSAGE BASHBOT_EVENT_CMD BASHBOT_EVENT_REPLY BASHBOT_EVENT_FORWARD BASHBOT_EVENT_SEND
declare -Ax BASHBOT_EVENT_CONTACT BASHBOT_EVENT_LOCATION BASHBOT_EVENT_FILE BASHBOT_EVENT_TEXT BASHBOT_EVENT_TIMER BASHBOT_BLOCKED
start_timer(){
# send alarm every ~60 s
@ -1006,7 +1006,7 @@ bot_init() {
fi
#setup bashbot
[[ "${UID}" -eq "0" ]] && RUNUSER="nobody"
echo -n "Enter User to run basbot [$RUNUSER]: "
echo -n "Enter User to run bashbot [$RUNUSER]: "
read -r TOUSER
[ -z "$TOUSER" ] && TOUSER="$RUNUSER"
if ! id "$TOUSER" &>/dev/null; then

View File

@ -9,7 +9,7 @@
# |_____/ \___/ |_| |_|\___/ \___) |_______)____|_|\___)_|
#
# this file *MUST* not be edited! place your config and commands in
# the file "mycommnds.sh". a clean version is provided as "mycommands.clean"
# the file "mycommands.sh". a clean version is provided as "mycommands.sh.clean"
#
# This file is public domain in the USA and all free countries.
@ -18,7 +18,7 @@
#### $$VERSION$$ v1.0-0-g99217c4
#
# adjust your language setting here, e.g.when run from other user or cron.
# adjust your language setting here, e.g. when run from other user or cron.
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
export 'LC_ALL=C.UTF-8'
export 'LANG=C.UTF-8'
@ -29,7 +29,7 @@ unset IFS
#-----------------------------
# this file *MUST* not edited!
# copy "mycommands.sh.dist" to "mycommnds.sh" and change the strings there
# copy "mycommands.sh.dist" to "mycommands.sh" and change the strings there
bashbot_info='This is bashbot, the Telegram bot written entirely in bash.
It features background tasks and interactive chats, and can serve as an interface for CLI programs.
It currently can send, receive and forward messages, custom keyboards, photos, audio, voice, documents, locations and video files.
@ -37,7 +37,7 @@ It currently can send, receive and forward messages, custom keyboards, photos, a
#-----------------------------
# this file *MUST* not edited!
# copy "mycommands.sh.dist" to "mycommnds.sh" and change the strings there
# copy "mycommands.sh.dist" to "mycommands.sh" and change the strings there
bashbot_help='Place your own commands and messages in mycommands.sh
*Available commands*:
@ -65,7 +65,7 @@ fi
#----------------------------
# this file *MUST* not edited!
# copy "mycommands.sh.dist" to "mycommnds.sh" and change the values there
# copy "mycommands.sh.dist" to "mycommands.sh" and change the values there
# defaults to no inline and nonsense home dir
export INLINE="0"
export FILE_REGEX="${BASHBOT_ETC}/.*"
@ -97,7 +97,7 @@ if [ -z "${1}" ] || [[ "${1}" == *"debug"* ]];then
case "${MESSAGE}" in
################################################
# this file *MUST* not edited!
# copy "mycommands.sh.dist" to "mycommnds.sh" and change the values and add your commands there
# copy "mycommands.sh.dist" to "mycommands.sh" and change the values and add your commands there
#
# GLOBAL commands start here, edit messages only
'/info'*)

View File

@ -26,7 +26,7 @@ passed=0
#echo PLAN ${#all_tests}
for test in $(find ./*-test.sh | sort -u) ;
do
[ "${test}" = "test/all-tests.sh" ] && continue
[ "${test}" = "dev/all-tests.sh" ] && continue
[ ! -x "${test}" ] && continue
tests=$((tests+1))
echo "TEST: ${test}"
@ -56,6 +56,6 @@ fi
echo -e "${passed} / ${tests}\\n"
[ -d "${TESTENV}" ] && echo "Logfiles from run are in ${TESTENV}"
ls -ld /tmp/bashbot.test* 2>/dev/null && echo "Don not forget to deleted bashbot test files in /tmp!!"
ls -ld /tmp/bashbot.test* 2>/dev/null && echo "Do not forget to delete bashbot test files in /tmp!!"
exit ${exitcode}

View File

@ -65,7 +65,7 @@ else
exit 1
fi
if which codespell &>/dev/null; then
if command -v codespell &>/dev/null; then
echo "Running codespell"
echo "............................"
codespell -B 1 --skip="*.log,*.html,*.txt,.git*,jsonDB-keyboard" -L "ba"

View File

@ -7,7 +7,7 @@
* /usr/local if you want to run as service
2. [Download latest release zip from github](https://github.com/topkecleon/telegram-bot-bash/releases) and extract all files.
3. Change into the directory ```telegram-bot-bash```
4. Acticate the bot example commands ``cp mycommands.sh.dist mycommands.sh```
4. Activate the bot example commands ``cp mycommands.sh.dist mycommands.sh```
5. Run ```./bashbot.sh init``` to setup the environment and enter your Bots token given by botfather.
Edit 'mycommands.sh to your needs.
@ -24,7 +24,7 @@ As an alternative to download the zip files, you can clone the github repository
* /usr/local if you want to run as service
2. Run ```git clone https://github.com/topkecleon/telegram-bot-bash.git```
3. Change into the directory ```telegram-bot-bash```
4. Run ``` test/ALL-tests.sh``` and if everything finish OK ...
4. Run ``` dev/all-tests.sh``` and if everything finish OK ...
5. Run ```sudo ./bashbot.sh init``` to setup the environment and enter your Bots token given by botfather.
### Update bashbot

View File

@ -47,7 +47,7 @@ Have FUN!
│   ├── antiFlood.sh # simple addon taking actions based on # files and text sent to chat
│   └── xxxxxage.sh
├── bashbot.rc # start/stop script if you run basbot as service
├── bashbot.rc # start/stop script if you run bashbot as service
├── examples # example scripts and configs for bashbot
│   ├── README.md # description of files and examples

View File

@ -15,7 +15,7 @@
# use ${ME} for current bot name in messages
# Note: you must escape '_' in botname with two \ in markdown messages!
export bashbot_info='This is @'"${ME//_/\\\\_}"', the Telegram example bot written entirely in bash.
Edit commands and messages in mycommnds.sh!
Edit commands and messages in mycommands.sh!
'
# export bashbot_help='*Available commands*:
#'
@ -89,7 +89,7 @@ else
# action triggered on first message after startup
if [[ "$(getConfigKey "startupaction")" != "done"* ]]; then
# send message to first user on startup
send_normal_message "${CHAT[ID]}" "Hi, you was the first one after startup!"
send_normal_message "${CHAT[ID]}" "Hi, you are the first user after startup!"
# mark as done and when
setConfigKey "startupaction" "done $(date)"
fi