mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 23:25:08 +00:00
remove use of BOTDAMIN to et bot admin
This commit is contained in:
parent
b04ee84b1d
commit
ddb2785f8b
@ -4,7 +4,7 @@
|
||||
# this addon counts how many files, e.g. stickers, are sent to
|
||||
# a chat and takes actions if threshold is reached
|
||||
#
|
||||
#### $$VERSION$$ v1.20-0-g2ab00a2
|
||||
#### $$VERSION$$ v1.21-dev-44-gb04ee84
|
||||
|
||||
# used events:
|
||||
#
|
||||
@ -44,7 +44,7 @@ fi
|
||||
|
||||
# register on startbot
|
||||
if [[ "$1" = "start"* ]]; then
|
||||
ANTIFL_ADMIN="$(< "${BOTADMIN}")"
|
||||
ANTIFL_ADMIN="$(getConfigKey "botadmin")"
|
||||
#load existing chat settings on start
|
||||
jssh_readDB "ANTIFL_CHATS" "addons/$ANTIFL_ME"
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Addons can register to bashbot events at startup
|
||||
# by providing their name and a callback per event
|
||||
#
|
||||
#### $$VERSION$$ v1.21-dev-1-g03bdecb
|
||||
#### $$VERSION$$ v1.21-dev-44-gb04ee84
|
||||
#
|
||||
# If an event occurs each registered event function is called.
|
||||
#
|
||||
@ -60,6 +60,7 @@ fi
|
||||
if [[ "$1" = "start"* ]]; then
|
||||
# register to reply
|
||||
BASHBOT_EVENT_REPLY["${EXAMPLE_ME}"]="${EXAMPLE_ME}_reply"
|
||||
EXAMPLE_ADMIN="$(getConfigKey "botadmin")"
|
||||
|
||||
# any function defined by addons MUST be prefixed by addon name
|
||||
# function local variables can have any name, but must be LOCAL
|
||||
@ -87,7 +88,7 @@ if [[ "$1" = "start"* ]]; then
|
||||
# any function defined by addons MUST be prefixed by addon name
|
||||
# function local variables can have any name, but must be LOCAL
|
||||
example_after5min(){
|
||||
send_markdown_message "$(< "${BOTADMIN}")" "This is a one time event after 5 Minutes!" &
|
||||
send_markdown_message "${EXAMPLE_ADMIN}" "This is a one time event after 5 Minutes!" &
|
||||
}
|
||||
|
||||
BASHBOT_EVENT_TIMER["${EXAMPLE_ME}every2min","2"]="${EXAMPLE_ME}_every2min"
|
||||
@ -95,7 +96,7 @@ if [[ "$1" = "start"* ]]; then
|
||||
# any function defined by addons MUST be prefixed by addon name
|
||||
# function local variables can have any name, but must be LOCAL
|
||||
example_every2min(){
|
||||
send_markdown_message "$(< "${BOTADMIN}")" "This a a every 2 minute event ..." &
|
||||
send_markdown_message "${EXAMPLE_ADMIN}" "This a a every 2 minute event ..." &
|
||||
}
|
||||
|
||||
# register to send
|
||||
|
Loading…
Reference in New Issue
Block a user