bot. But it cant seem to read file1 and file2 of the below sample code i found on the net. I suspect something abt the faraday im doing it wrong. Can someone help? How to use faraday?
bot.api.send_media_group(
chat_id: message.chat.id,
media: [
Telegram::Bot::Types::InputMediaPhoto.new(media: 'attach://file1'),
Telegram::Bot::Types::InputMediaPhoto.new(media: 'attach://file2')
],
file1: Faraday::UploadIO.new('/path/to/file1.png', 'image/png'),
file2: Faraday::UploadIO.new('/path/to/file2.png', 'image/png')
)
Im using telegram bot ruby gem btw
Anyone?
anyone?
if($text == '/send'){ bot("sendMediaGroup",[ "chat_id"=>$cid, "media"=>json_encode([ ["type"=>"photo", "media" => "URL"], ["type"=>"photo", "media" => "URL"], ]), 'caption'=>"caption", 'parse_mode'=>"html"])])}
Обсуждают сегодня