bin: any_command fix reference location

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-01-31 12:38:40 +01:00
parent f377e17e44
commit 8034a5f055
2 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ USAGE='any_command.sh [-h|--help] [--force|--reference] bot_command args ...'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 30.01.2021 10:24
#
#### $$VERSION$$ v1.40-dev-6-g08b7b85
#### $$VERSION$$ v1.40-dev-16-gf377e17
#===============================================================================
####
@ -50,10 +50,10 @@ else
error=3
fi
# simple hack to get allowed commands from doc
if grep -q "^##### $1" <<<"$(sed -n -e '/^##### _is_/,$ d' -e '/^##### /p' "../doc/"6_*)"; then
if grep -q "^##### $1" <<<"$(sed -n -e '/^##### _is_/,$ d' -e '/^##### /p' "${BASHBOT_HOME:-..}doc/"6_*)"; then
# oiutput reference and exit
if [[ "${ref}" == "--ref"* ]]; then
sed -n -e '/^##### '"$1"'/,/^##/ p' "../doc/"6_*
sed -n -e '/^##### '"$1"'/,/^##/ p' "${BASHBOT_HOME:-..}doc/"6_*
exit
fi
else

View File

@ -1269,7 +1269,7 @@ bin/any_command.sh delete_webhook false
##### set_webhook
`set_webhook` instructs Telegram to use your bots webhook for delivering updates. If a webhook is set
`set_webhook` instructs Telegram to use your bots webhook for delivering updates. If webhook is set
it's no more possible to pull updates from `bashbot start`, you must delete webhook first.
*Important*: Before using webhook you must setup your server to receive and process updates from Telegram!
@ -1278,7 +1278,7 @@ it's no more possible to pull updates from `bashbot start`, you must delete webh
First arg is webhook URL used to send updates to your bot, `:port` and `/path` are optional.
If `:port` is given it must be one of `:443`, `:80`, `:88` or `:8443`, default is`:80`.
For security reasons `BOTTOKEN` will be added to URL (_e.g. `https://myhost.com` -> `https://myhost.com/12345678:azndfhbgdfbbbdsfg`_).
For security reasons `BOTTOKEN` will be added to URL (_e.g. `https://myhost.com` -> `https://myhost.com/12345678:azndfhbgdfbbbdsfg/`_).
Second arg is max connection rate in the range 1-100, bashbot default is 1.
@ -1578,5 +1578,5 @@ The name of your bot is available as bash variable "$ME", there is no need to ca
#### [Prev Best Practice](5_practice.md)
#### [Next Notes for Developers](7_develop.md)
#### $$VERSION$$ v1.40-dev-15-gbc3a3b3
#### $$VERSION$$ v1.40-dev-16-gf377e17