Sha256: 480be47c3bf6d3b4fffb960ddeb0ac403a0ab05dc8a8fd33e3d647223cefe443

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

require 'telegram/url'
require 'telegram/reply/request'

module Telegram
  module Reply

    def send_photo(chat_id: @chat.id, photo:, **options)
      url     = Telegram::URL.new(@telegram_bot_token).send_photo
      params  = {
                  chat_id: chat_id,
                  photo: photo,
                  caption: options[:caption].presence,
                  parse_mode: options[:parse_mode].presence,
                  disable_notification: options[:disable_notification].presence,
                  reply_to_message_id: options[:reply_to_message_id].presence,
                  reply_markup: options[:reply_markup].presence
                }
      
      Telegram::Reply::SEND(url: url, params: params)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tg-bot-0.0.5 lib/telegram/reply/send_photo.rb