Module: TeleRb::MediaMethods

Included in:
TelegramBot
Defined in:
lib/telerb/methods/media_methods.rb

Overview

Message Methods

Instance Method Summary collapse

Instance Method Details

#send_audio(chat_id, audio_path, caption = nil, reply_to_message_id = nil) ⇒ Object



10
11
12
# File 'lib/telerb/methods/media_methods.rb', line 10

def send_audio(chat_id, audio_path, caption = nil, reply_to_message_id = nil)
  send_media(chat_id, audio_path, caption, reply_to_message_id, "sendAudio", :audio)
end

#send_document(chat_id, document_path, caption = nil, reply_to_message_id = nil) ⇒ Object



18
19
20
# File 'lib/telerb/methods/media_methods.rb', line 18

def send_document(chat_id, document_path, caption = nil, reply_to_message_id = nil)
  send_media(chat_id, document_path, caption, reply_to_message_id, "sendDocument", :document)
end

#send_photo(chat_id, photo_path, caption = nil, reply_to_message_id = nil) ⇒ Object



6
7
8
# File 'lib/telerb/methods/media_methods.rb', line 6

def send_photo(chat_id, photo_path, caption = nil, reply_to_message_id = nil)
  send_media(chat_id, photo_path, caption, reply_to_message_id, "sendPhoto", :photo)
end

#send_sticker(chat_id, sticker_path, reply_to_message_id = nil) ⇒ Object



22
23
24
# File 'lib/telerb/methods/media_methods.rb', line 22

def send_sticker(chat_id, sticker_path, reply_to_message_id = nil)
  send_media(chat_id, sticker_path, reply_to_message_id, "sendSticker", :sticker)
end

#send_video(chat_id, video_path, caption = nil, reply_to_message_id = nil) ⇒ Object



14
15
16
# File 'lib/telerb/methods/media_methods.rb', line 14

def send_video(chat_id, video_path, caption = nil, reply_to_message_id = nil)
  send_media(chat_id, video_path, caption, reply_to_message_id, "sendVideo", :video)
end