mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 23:45:10 +00:00
Fixed bug in inline query function.
This commit is contained in:
parent
9b64c3fae6
commit
b2c5793032
38
bashbot.sh
38
bashbot.sh
@ -109,64 +109,64 @@ send_html_message() {
|
|||||||
answer_inline_query() {
|
answer_inline_query() {
|
||||||
case $2 in
|
case $2 in
|
||||||
"article")
|
"article")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","title":"'$3'","message_text":"'$4'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","title":"'$3'","message_text":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"photo")
|
"photo")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","photo_url":"'$3'","thumb_url":"'$4'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","photo_url":"'$3'","thumb_url":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"gif")
|
"gif")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","gif_url":"'$3'", "thumb_url":"'$4'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","gif_url":"'$3'", "thumb_url":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"mpeg4_gif")
|
"mpeg4_gif")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","mpeg4_url":"'$3'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","mpeg4_url":"'$3'"}]'
|
||||||
;;
|
;;
|
||||||
"video")
|
"video")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","video_url":"'$3'","mime_type":"'$4'","thumb_url":"'$5'","title":"'$6'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","video_url":"'$3'","mime_type":"'$4'","thumb_url":"'$5'","title":"'$6'"}]'
|
||||||
;;
|
;;
|
||||||
"audio")
|
"audio")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","audio_url":"'$3'","title":"'$4'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","audio_url":"'$3'","title":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"voice")
|
"voice")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","voice_url":"'$3'","title":"'$4'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","voice_url":"'$3'","title":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"document")
|
"document")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","title":"'$3'","caption":"'$4'","document_url":"'$5'","mime_type":"'$6'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","title":"'$3'","caption":"'$4'","document_url":"'$5'","mime_type":"'$6'"}]'
|
||||||
;;
|
;;
|
||||||
"location")
|
"location")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","latitude":"'$3'","longitude":"'$4'","title":"'$5'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","latitude":"'$3'","longitude":"'$4'","title":"'$5'"}]'
|
||||||
;;
|
;;
|
||||||
"venue")
|
"venue")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","latitude":"'$3'","longitude":"'$4'","title":"'$5'","address":"'$6'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","latitude":"'$3'","longitude":"'$4'","title":"'$5'","address":"'$6'"}]'
|
||||||
;;
|
;;
|
||||||
"contact")
|
"contact")
|
||||||
InlineQueryResult='[{"type":"'$2'","id":"$RANDOM","phone_number":"'$3'","first_name":"'$4'"}]'
|
InlineQueryResult='[{"type":"'$2'","id":"'$RANDOM'","phone_number":"'$3'","first_name":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Cached media stored in Telegram server
|
# Cached media stored in Telegram server
|
||||||
|
|
||||||
"cached_photo")
|
"cached_photo")
|
||||||
InlineQueryResult='[{"type":"photo","id":"$RANDOM","photo_file_id":"'$3'"}]'
|
InlineQueryResult='[{"type":"photo","id":"'$RANDOM'","photo_file_id":"'$3'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_gif")
|
"cached_gif")
|
||||||
InlineQueryResult='[{"type":"gif","id":"$RANDOM","gif_file_id":"'$3'"}]'
|
InlineQueryResult='[{"type":"gif","id":"'$RANDOM'","gif_file_id":"'$3'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_mpeg4_gif")
|
"cached_mpeg4_gif")
|
||||||
InlineQueryResult='[{"type":"mpeg4_gif","id":"$RANDOM","mpeg4_file_id":"'$3'"}]'
|
InlineQueryResult='[{"type":"mpeg4_gif","id":"'$RANDOM'","mpeg4_file_id":"'$3'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_sticker")
|
"cached_sticker")
|
||||||
InlineQueryResult='[{"type":"sticker","id":"$RANDOM","sticker_file_id":"'$3'"}]'
|
InlineQueryResult='[{"type":"sticker","id":"'$RANDOM'","sticker_file_id":"'$3'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_document")
|
"cached_document")
|
||||||
InlineQueryResult='[{"type":"document","id":"$RANDOM","title":"'$3'","document_file_id":"'$4'"}]'
|
InlineQueryResult='[{"type":"document","id":"'$RANDOM'","title":"'$3'","document_file_id":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_video")
|
"cached_video")
|
||||||
InlineQueryResult='[{"type":"video","id":"$RANDOM","video_file_id":"'$3'","title":"'$4'"}]'
|
InlineQueryResult='[{"type":"video","id":"'$RANDOM'","video_file_id":"'$3'","title":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_voice")
|
"cached_voice")
|
||||||
InlineQueryResult='[{"type":"voice","id":"$RANDOM","voice_file_id":"'$3'","title":"'$4'"}]'
|
InlineQueryResult='[{"type":"voice","id":"'$RANDOM'","voice_file_id":"'$3'","title":"'$4'"}]'
|
||||||
;;
|
;;
|
||||||
"cached_audio")
|
"cached_audio")
|
||||||
InlineQueryResult='[{"type":"audio","id":"$RANDOM","audio_file_id":"'$3'"}]'
|
InlineQueryResult='[{"type":"audio","id":"'$RANDOM'","audio_file_id":"'$3'"}]'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user