modules: chatMember: new invite, pin unpin unpinAll, delete_chat_photo

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-01-14 18:06:24 +01:00
parent f573d63c55
commit daeffb30e8
2 changed files with 31 additions and 2 deletions

View File

@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb
# 8 - curl/wget missing # 8 - curl/wget missing
# 10 - not bash! # 10 - not bash!
# #
#### $$VERSION$$ v1.30-dev-3-gf8d8ede #### $$VERSION$$ v1.30-dev-4-gf573d63
################################################################## ##################################################################
# emmbeded system may claim bash but it is not # emmbeded system may claim bash but it is not

View File

@ -5,7 +5,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.30-dev-2-gcc299a5 #### $$VERSION$$ v1.30-dev-4-gf573d63
# will be automatically sourced from bashbot # will be automatically sourced from bashbot
@ -14,6 +14,11 @@ eval "$(basename "${BASH_SOURCE[0]}")(){ :; }"
# manage chat functions ------- # manage chat functions -------
# $1 chat
new_chat_invite() {
sendJson "$1" "" "${URL}/exportChatInviteLink"
}
# $1 chat, $2 title # $1 chat, $2 title
set_chat_title() { set_chat_title() {
sendJson "$1" '"title": "'"$2"'"' "${URL}/setChatTitle" sendJson "$1" '"title": "'"$2"'"' "${URL}/setChatTitle"
@ -24,6 +29,30 @@ set_chat_description() {
sendJson "$1" '"description": "'"$2"'"' "${URL}/setChatDescription" sendJson "$1" '"description": "'"$2"'"' "${URL}/setChatDescription"
} }
# $1 chat
delete_chat_photo() {
sendJson "$1" "" "${URL}/deleteChatPhoto"
}
# $1 chat, $2 message_id
pin_chat_message() {
sendJson "$1" '"message_id": "'"$2"'"' "${URL}/pinChatMessage"
}
# $1 chat, $2 message_id
unpin_chat_message() {
sendJson "$1" '"message_id": "'"$2"'"' "${URL}/unpinChatMessage"
}
# $1 chat
unpinAll_chat_message() {
sendJson "$1" "" "${URL}/unpinAllChatMessage"
}
# $1 chat
delete_chat_stickers() {
sendJson "$1" "" "${URL}/deleteChatStickerSet"
}
# manage chat member functions ------- # manage chat member functions -------
kick_chat_member() { kick_chat_member() {