mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 23:25:08 +00:00
start 0.80 dev
This commit is contained in:
parent
8ea9e3b158
commit
4e4194d4a4
@ -97,6 +97,6 @@
|
||||
<p><span class="citation">@Gnadelwartz</span></p>
|
||||
<h2 id="thats-it">That’s it!</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 id="version-v0.70-0-g6243be9"><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.70-0-g6243be9</h4>
|
||||
<h4 id="version-v0.70-0-g8ea9e3b"><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.70-0-g8ea9e3b</h4>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -94,4 +94,4 @@ Well, thats a damn good question ... may be because I'm an Unix/Linux admin from
|
||||
|
||||
If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
@ -133,4 +133,4 @@ health status
|
||||
If you feel that there's something missing or if you found a bug, feel free to
|
||||
submit a pull request!
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# description: Start or stop telegram-bash-bot
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
# shellcheck disable=SC2009
|
||||
# shellcheck disable=SC2181
|
||||
|
||||
|
@ -12,7 +12,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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 sucess (hopefully)
|
||||
@ -87,6 +87,7 @@ if [ ! -f "${BOTADMIN}" ]; then
|
||||
echo -e "${ORANGE}TO MAKE FIRST USER TYPING '/start' TO BOTADMIN${NC}"
|
||||
read -r token
|
||||
echo "${token}" > "${BOTADMIN}"
|
||||
[ "${token}" = "" ] && echo '?' > "${BOTADMIN}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
#
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2034
|
||||
@ -105,15 +105,15 @@ else
|
||||
'/start'*)
|
||||
send_action "${CHAT[ID]}" "typing"
|
||||
_is_botadmin && _markdown_message "You are *BOTADMIN*."
|
||||
if _is_allowed "start" ; then
|
||||
_markdown_message "${bot_help}"
|
||||
if _is_botadmin || _is_allowed "start" ; then
|
||||
_markdown_message "${bashbot_help}"
|
||||
else
|
||||
_message "You are not allowed to start Bot."
|
||||
fi
|
||||
;;
|
||||
|
||||
'/help'*)
|
||||
_markdown_message "${bot_help}"
|
||||
_markdown_message "${bashbot_help}"
|
||||
;;
|
||||
'/leavechat'*) # bot leave chat if user is admin in chat
|
||||
if _is_admin ; then
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
# works together with git pre-push.sh and ADD all changed files since last push
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
############
|
||||
# NOTE: you MUST run install-hooks.sh again when updating this file!
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
############
|
||||
# NOTE: you MUST run install-hooks.sh again when updating this 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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,3 +1,3 @@
|
||||
# list of additional files to check from shellcheck
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
bashbot.rc
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
# shellcheck disable=SC2016
|
||||
#
|
||||
# Easy Versioning in git:
|
||||
|
@ -63,5 +63,5 @@ The old format is supported for backward compatibility, but may fail for corner
|
||||
|
||||
#### [Next Create Bot](1_firstbot.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -167,5 +167,5 @@ send_action "${CHAT[ID]}" "action"
|
||||
#### [Prev Create Bot](1_firstbot.md)
|
||||
#### [Next Advanced Usage](3_advanced.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -177,5 +177,5 @@ answer_inline_query "$iQUERY_ID" "cached_sticker" "identifier for the sticker"
|
||||
#### [Prev Getting started](2_usage.md)
|
||||
#### [Next Expert Use](4_expert.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -153,5 +153,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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -489,5 +489,5 @@ Send Input from Telegram to waiting Interactive Chat.
|
||||
#### [Prev Best Practice](5_practice.md)
|
||||
#### [Next Notes for Developers](7_develop.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -117,5 +117,5 @@ fi
|
||||
#### [Prev Function Reference](6_reference.md)
|
||||
#### [Next Bashbot Environment](8_custom.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -117,5 +117,5 @@ for every poll until the maximum of BASHBOT_SLEEP ms.
|
||||
|
||||
#### [Prev Notes for Developers](7_develop.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -2,7 +2,7 @@
|
||||
# file: run_filename
|
||||
# background job to display content of all new files in WATCHDIR
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -2,7 +2,7 @@
|
||||
# file: run_filename
|
||||
# background job to display all new files in WATCHDIR
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -2,7 +2,7 @@
|
||||
# file. multibot.sh
|
||||
# description: run multiple telegram bots from one installation
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
if [ "${2}" = "" ] || [ "${2}" = "-h" ]; then
|
||||
echo "Usage: $0 botname command"
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
|
||||
SHELL=/bin/sh
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -1,7 +1,7 @@
|
||||
# file: botacl
|
||||
# a user not listed here, will return false from 'user_is_allowed'
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
# Format:
|
||||
# user:ressource:chat
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
#
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2034
|
||||
@ -43,7 +43,7 @@ mycommands() {
|
||||
local cmd="${arg[0]}"
|
||||
local msg=""
|
||||
|
||||
if user_is_botadmin || user_is_allowed "${USER[ID]}" "systemstatus"; then
|
||||
if user_is_botadmin "${USER[ID]}" || user_is_allowed "${USER[ID]}" "systemstatus"; then
|
||||
case "$cmd" in
|
||||
'/md'*) msg="$(cat /proc/mdstat)";;
|
||||
'/smb'*) msg="$(smbstatus)" ;;
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
#
|
||||
# source from commands.sh to use the aliases
|
||||
|
||||
|
@ -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.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# source from commands.sh if you want ro use interactive or background jobs
|
||||
|
||||
|
@ -5,6 +5,6 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# source from commands.sh to use the inline functions
|
||||
|
@ -2,7 +2,7 @@
|
||||
# files: mycommands.sh.dist
|
||||
# copy to mycommands.sh and add all your commands and functions here ...
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
#
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2034
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# ADD a new test skeleton to test dir, but does not activate test
|
||||
#
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# common variables
|
||||
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
../dev/hooks/pre-commit.sh
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# file: b-example-test.sh
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-0-g6243be9
|
||||
#### $$VERSION$$ v0.70-0-g8ea9e3b
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
Loading…
Reference in New Issue
Block a user