mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-29 00:28:25 +00:00
move _botadmin back to aliases
This commit is contained in:
parent
d34c22f156
commit
300553f8ba
@ -12,7 +12,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.80-pre-5-ge5f7b2d
|
#### $$VERSION$$ v0.80-pre-6-gd34c22f
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
@ -142,10 +142,6 @@ download() {
|
|||||||
printf '%s\n' "${TMPDIR:-.}/${file}"
|
printf '%s\n' "${TMPDIR:-.}/${file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# easy handling of users:
|
|
||||||
_is_botadmin() {
|
|
||||||
user_is_botadmin "${USER[ID]}"
|
|
||||||
}
|
|
||||||
# $1 postfix, e.g. chatid
|
# $1 postfix, e.g. chatid
|
||||||
# $2 prefix, back- or startbot-
|
# $2 prefix, back- or startbot-
|
||||||
procname(){
|
procname(){
|
||||||
|
@ -5,10 +5,14 @@
|
|||||||
# 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.80-pre-5-ge5f7b2d
|
#### $$VERSION$$ v0.80-pre-6-gd34c22f
|
||||||
#
|
#
|
||||||
# source from commands.sh to use the aliases
|
# source from commands.sh to use the aliases
|
||||||
|
|
||||||
|
# easy handling of users:
|
||||||
|
_is_botadmin() {
|
||||||
|
user_is_botadmin "${USER[ID]}"
|
||||||
|
}
|
||||||
_is_admin() {
|
_is_admin() {
|
||||||
user_is_admin "${CHAT[ID]}" "${USER[ID]}"
|
user_is_admin "${CHAT[ID]}" "${USER[ID]}"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user