mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-25 00:37:34 +00:00
fix delete message and *.jssh must be writeable
This commit is contained in:
parent
5819b5cac4
commit
e2c998c5b9
@ -4,7 +4,7 @@
|
|||||||
# this addon counts how many files, e.g. stickers, are sent to
|
# this addon counts how many files, e.g. stickers, are sent to
|
||||||
# a chat and takes actions if threshold is reached
|
# a chat and takes actions if threshold is reached
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.90-0-g7029f7f
|
#### $$VERSION$$ v0.90-6-g5819b5c
|
||||||
|
|
||||||
# used events:
|
# used events:
|
||||||
#
|
#
|
||||||
@ -58,15 +58,18 @@ if [[ "$1" = "start"* ]]; then
|
|||||||
ANTIFL_CHATS["${CHAT[ID]}","level"]="${ANTIFL_DEFAULT}"
|
ANTIFL_CHATS["${CHAT[ID]}","level"]="${ANTIFL_DEFAULT}"
|
||||||
ANTIFL_CHATS["${CHAT[ID]}","ban"]="${ANTIFL_BAN}"
|
ANTIFL_CHATS["${CHAT[ID]}","ban"]="${ANTIFL_BAN}"
|
||||||
[[ "${CMD[1]}" =~ ^[0-9]+$ ]] && ANTIFL_CHATS["${CHAT[ID]}","level"]="${CMD[1]}"
|
[[ "${CMD[1]}" =~ ^[0-9]+$ ]] && ANTIFL_CHATS["${CHAT[ID]}","level"]="${CMD[1]}"
|
||||||
|
[[ "${CMD[2]}" =~ ^[0-9]+$ ]] && ANTIFL_CHATS["${CHAT[ID]}","ban"]="${CMD[2]}"
|
||||||
antiFlood_timer
|
antiFlood_timer
|
||||||
;;
|
;;
|
||||||
# command /afactive starts counter meausares
|
# command /afactive starts counter meausares
|
||||||
"/afdo")
|
"/afdo" | "/afactive")
|
||||||
ANTIFL_CHATS["${CHAT[ID]}","active"]="yes"
|
ANTIFL_CHATS["${CHAT[ID]}","active"]="yes"
|
||||||
|
jssh_writeDB "ANTIFL_CHATS" "addons/$ANTIFL_ME" &
|
||||||
;;
|
;;
|
||||||
# command /afactive starts counter meausares
|
# command /afactive starts counter meausares
|
||||||
"/afstop")
|
"/afstop")
|
||||||
ANTIFL_CHATS["${CHAT[ID]}","active"]="no"
|
ANTIFL_CHATS["${CHAT[ID]}","active"]="no"
|
||||||
|
jssh_writeDB "ANTIFL_CHATS" "addons/$ANTIFL_ME" &
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -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$$ v0.90-3-g9a81e44
|
#### $$VERSION$$ v0.90-6-g5819b5c
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
@ -215,7 +215,7 @@ _is_function()
|
|||||||
|
|
||||||
declare -xr DELETE_URL=$URL'/deleteMessage'
|
declare -xr DELETE_URL=$URL'/deleteMessage'
|
||||||
delete_message() {
|
delete_message() {
|
||||||
sendJson "${1}" 'message_id: '"${2}"'' "${DELETE_URL}"
|
sendJson "${1}" '"message_id": '"${2}"'' "${DELETE_URL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_file() {
|
get_file() {
|
||||||
|
Loading…
Reference in New Issue
Block a user