dev2, fix test for send_message

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-05-26 16:50:19 +02:00
parent ec856365ed
commit 981c0eec01
53 changed files with 57 additions and 58 deletions

View File

@ -193,6 +193,6 @@ It features background tasks and interactive chats, and can serve as an interfac
<p><span class="citation">@Gnadelwartz</span></p>
<h2 id="thats-it">Thats it!</h2>
<p>If you feel that theres something missing or if you found a bug, feel free to submit a pull request!</p>
<h4 id="version-v0.80-22-g15e7f01"><br /><span class="math display"><em>V</em><em>E</em><em>R</em><em>S</em><em>I</em><em>O</em><em>N</em></span><br /> v0.80-22-g15e7f01</h4>
<h4 id="version-v0.90-dev2-0-gec85636"><br /><span class="math display"><em>V</em><em>E</em><em>R</em><em>S</em><em>I</em><em>O</em><em>N</em></span><br /> v0.90-dev2-0-gec85636</h4>
</body>
</html>

View File

@ -182,4 +182,4 @@ This may happen if to many wrong requests are sent to api.telegram.org, e.g. usi
If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
#### $$VERSION$$ v0.80-22-g15e7f01
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -256,4 +256,4 @@ tor proxy on your server you may uncomment the ```BASHBOT_CURL_ARGS``` line in
If you feel that there's something missing or if you found a bug, feel free to
submit a pull request!
#### $$VERSION$$ v0.80-22-g15e7f01
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -1,7 +1,7 @@
#!/bin/sh
# description: Start or stop telegram-bash-bot
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# shellcheck disable=SC2009
# shellcheck disable=SC2181

View File

@ -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-29-gbee9f33
#### $$VERSION$$ v0.90-dev2-0-gec85636
#
# Exit Codes:
# - 0 sucess (hopefully)
@ -579,11 +579,6 @@ 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
@ -600,6 +595,10 @@ 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

View File

@ -5,7 +5,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-23-g25c9b62
#### $$VERSION$$ v0.90-dev2-0-gec85636
#
# adjust your language setting here, e.g.when run from other user or cron.

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# this has to run once atfer git clone
# and every time we create new hooks
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -3,7 +3,7 @@
#
# works together with git pre-push.sh and ADD all changed files since last push
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
############
# NOTE: you MUST run install-hooks.sh again when updating this file!

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
############
# NOTE: you MUST run install-hooks.sh again when updating this file!

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# this has to run once atfer git clone
# and every time we create new hooks
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -2,7 +2,7 @@
# file: make-distribution.sh
# creates files and arcchives to dirtribute bashbot
#
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -5,7 +5,7 @@
# If you your bot is finished you can use make-standalone.sh to create the
# the old all-in-one bashbot: bashbot.sh and commands.sh only!
#
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -1,3 +1,3 @@
# list of additional files to check from shellcheck
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
bashbot.rc

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
#### $$VERSION$$ v0.80-26-g9f74bcf
#### $$VERSION$$ v0.90-dev2-0-gec85636
# shellcheck disable=SC2016
#
# Easy Versioning in git:

View File

@ -87,5 +87,5 @@ The old format is supported for backward compatibility, but may fail for corner
#### [Next Create Bot](1_firstbot.md)
#### $$VERSION$$ v0.80-24-g68bee46
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -65,5 +65,5 @@ group. This step is up to you actually.
#### [Prev Installation](0_install.md)
#### [Next Getting started](2_usage.md)
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -221,5 +221,5 @@ send_action "${CHAT[ID]}" "action"
#### [Prev Create Bot](1_firstbot.md)
#### [Next Advanced Usage](3_advanced.md)
#### $$VERSION$$ v0.80-25-g43372f5
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -180,5 +180,5 @@ See also [answer_inline_multi, answer_inline_compose](6_reference.md#answer_inli
#### [Prev Getting started](2_usage.md)
#### [Next Expert Use](4_expert.md)
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -104,5 +104,5 @@ An example crontab is provided in ```examples/bashbot.cron```.
#### [Prev Expert Use](4_expert.md)
#### [Next Best Practice](5_practice.md)
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -152,5 +152,5 @@ The second warning is about an unused variable, this is true because in our exam
#### [Prev Best Practice](5_practice.md)
#### [Next Functions Reference](6_reference.md)
#### $$VERSION$$ v0.80-24-g68bee46
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -688,5 +688,5 @@ The name of your bot is availible as bash variable "$ME", there is no need to ca
#### [Prev Best Practice](5_practice.md)
#### [Next Notes for Developers](7_develop.md)
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -188,5 +188,5 @@ fi
#### [Prev Function Reference](6_reference.md)
#### [Next Expert Use](8_custom.md)
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -247,5 +247,5 @@ for every poll until the maximum of BASHBOT_SLEEP ms.
#### [Prev Notes for Developers](7_develop.md)
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -55,6 +55,6 @@ convert existing bots.
**external-use** will contain some examples on how to send messages from external scripts to Telegram chats or users.
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636

View File

@ -4,7 +4,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -2,7 +2,7 @@
# file: run_filename
# background job to display content of all new files in WATCHDIR
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -2,7 +2,7 @@
# file: run_filename
# background job to display all new files in WATCHDIR
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -4,7 +4,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -2,7 +2,7 @@
# file. multibot.sh
# description: run multiple telegram bots from one installation
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
if [ "${2}" = "" ] || [ "${2}" = "-h" ]; then
echo "Usage: $0 botname command"

View File

@ -7,7 +7,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
SHELL=/bin/sh

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -4,7 +4,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -1,7 +1,7 @@
# file: botacl
# a user not listed here, will return false from 'user_is_allowed'
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# Format:
# user:ressource:chat

View File

@ -5,7 +5,7 @@
# to show how you can customize bashbot by only editing mycommands.sh
# NOTE: this is not tested, simply copied from original source and reworked!
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
#
# shellcheck disable=SC2154
# shellcheck disable=SC2034

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
#
# source from commands.sh to use the aliases

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# source from commands.sh to use the inline functions

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# source from commands.sh if you want ro use interactive or background jobs

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# source from commands.sh to use the member functions

View File

@ -5,7 +5,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-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# source from commands.sh to use the sendMessage functions

View File

@ -2,7 +2,7 @@
# files: mycommands.sh.dist
# copy to mycommands.sh and add all your commands and functions here ...
#
#### $$VERSION$$ v0.80-23-g25c9b62
#### $$VERSION$$ v0.90-dev2-0-gec85636
#
# uncomment the following lines to overwrite info and help messages

View File

@ -2,7 +2,7 @@
#
# ADD a new test skeleton to test dir, but does not activate test
#
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# common variables
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
../dev/hooks/pre-commit.sh

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# file: b-example-test.sh
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v0.80-18-g6b88656
#### $$VERSION$$ v0.90-dev2-0-gec85636
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh