mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-27 20:44:53 +00:00
modules: add edit_inline_keyboard
This commit is contained in:
parent
e9543991ee
commit
662c6f48cb
@ -6,7 +6,7 @@
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
# shellcheck disable=SC1117
|
||||
#### $$VERSION$$ v1.31-dev-13-g127cc85
|
||||
#### $$VERSION$$ v1.32-dev-0-ge954399
|
||||
|
||||
# will be automatically sourced from bashbot
|
||||
|
||||
@ -137,6 +137,13 @@ remove_keyboard() {
|
||||
#JSON='"text":"$2", "reply_markup": {"remove_keyboard":true}'
|
||||
}
|
||||
|
||||
# $1 CHAT $2 message-id $3 keyboard
|
||||
edit_inline_keyboard() {
|
||||
sendJson "$1" '"message_id":'"$2"', "reply_markup": {"inline_keyboard": [ '"$3"' ]}' "${URL}/editMessageReplyMarkup"
|
||||
# JSON='"message_id":"$2", "reply_markup": {"inline_keyboard": [ $3->[{"text":"text", "url":"url"}]<- ]}'
|
||||
}
|
||||
|
||||
|
||||
# $1 CHAT $2 message $3 keyboard
|
||||
send_inline_keyboard() {
|
||||
local text; text='"text":"'$(JsonEscape "$2")'"'; [ -z "$2" ] && text='"text":"..."'
|
||||
|
Loading…
Reference in New Issue
Block a user