I want to send some photos in one message by my bot in telegram. I use
bot.api.sendMediaGroup(chat_id: message.from.id,
media: [
{
type: 'photo',
photo: arr_r[z].to_s
},
{
type: 'photo',
photo: arr_r[z].to_s
}
])
and have an error
Telegram API has returned the error. (ok: "false", error_code: "400", description: "Bad Request: media not found") (Telegram::Bot::Exceptions::ResponseError)
I try to write another code
media_arr = {media: arr_r[z].to_s}
bot.api.sendMediaGroup(chat_id: message.from.id, type: 'photo', media: "#{media_arr}")
and have
Telegram API has returned the error. (ok: "false", error_code: "400", description: "Bad Request: can't parse media JSON object") (Telegram::Bot::Exceptions::ResponseError)
In bouth variants arr_r = ["", "AgABLABLABLABLABLAlbjJaiYhDuK_m9n4a8_q50WAAKsvDEb-xS4SCfgmSDNS2GZAQADAgADcwADKQQ"]
So now i don't know how to fix it... I'm hope for your help.