mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-15 02:13:44 +00:00
remove nashbot option broadcast, use broadcast.sh
This commit is contained in:
parent
c356143be4
commit
16a22995d6
23
bashbot.sh
23
bashbot.sh
@ -11,7 +11,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.2-dev2-29-g85ee757
|
#### $$VERSION$$ v1.2-dev2-34-gc356143
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 success (hopefully)
|
# - 0 success (hopefully)
|
||||||
@ -128,7 +128,7 @@ if [ "${SCRIPT}" != "${REALME}" ] || [ "$1" = "source" ]; then
|
|||||||
SOURCE="yes"
|
SOURCE="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BOTCOMMANDS="start, stop, status, help, init, stats, broadcast, suspendback, resumeback, killback"
|
BOTCOMMANDS="start, stop, status, help, init, stats, suspendback, resumeback, killback"
|
||||||
[[ -z "$1" && -z "${SOURCE}" ]] && echo -e "${ORANGE}Available commands: ${GREY}${BOTCOMMANDS}${NC}" && exit
|
[[ -z "$1" && -z "${SOURCE}" ]] && echo -e "${ORANGE}Available commands: ${GREY}${BOTCOMMANDS}${NC}" && exit
|
||||||
if [ "$1" = "help" ]; then
|
if [ "$1" = "help" ]; then
|
||||||
HELP="${BASHBOT_HOME:-.}/README"
|
HELP="${BASHBOT_HOME:-.}/README"
|
||||||
@ -1279,23 +1279,8 @@ if [ -z "${SOURCE}" ]; then
|
|||||||
;;
|
;;
|
||||||
# send message to all users
|
# send message to all users
|
||||||
'broadcast')
|
'broadcast')
|
||||||
ME="$(getConfigKey "botname")"
|
echo -e "${ORANGE}Output of ${BASHBOT_HOME:-.}/bin/send_broadcast.sh --help${NC}"
|
||||||
declare -A SENDALL
|
"${BASHBOT_HOME:-.}"/bin/send_broadcast.sh --help
|
||||||
shift
|
|
||||||
jssh_readDB_async "SENDALL" "${COUNTFILE}"
|
|
||||||
echo -e "Sending broadcast message to all users of ${ME} \c"
|
|
||||||
for MSG in ${!SENDALL[*]}
|
|
||||||
do
|
|
||||||
[[ ! "${MSG}" =~ ^[0-9-]*$ ]] && continue
|
|
||||||
(( USERS++ ))
|
|
||||||
if [ -n "$*" ]; then
|
|
||||||
send_message "${MSG}" "$*"
|
|
||||||
echo -e ".\c"
|
|
||||||
sleep 0.1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo -e "\nMessage \"$*\" sent to ${USERS} users."
|
|
||||||
debug_checks "end $1" "$@"
|
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
# does what it says
|
# does what it says
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
|
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
|
||||||
# CREATED: 16.12.2020 16:14:57
|
# CREATED: 16.12.2020 16:14:57
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.2-dev2-33-g1dd546b
|
#### $$VERSION$$ v1.2-dev2-34-gc356143
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
# set where your bashbot lives
|
# set where your bashbot lives
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
|
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
|
||||||
# CREATED: 16.12.2020 11:34:27
|
# CREATED: 16.12.2020 11:34:27
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.2-dev2-33-g1dd546b
|
#### $$VERSION$$ v1.2-dev2-34-gc356143
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
# set where your bashbot lives
|
# set where your bashbot lives
|
||||||
|
Loading…
Reference in New Issue
Block a user