class TelegramBot::OutMessage
Public Instance Methods
chat_friendly_name()
click to toggle source
# File lib/telegram_bot/out_message.rb, line 15 def chat_friendly_name chat.friendly_name end
send_with(bot)
click to toggle source
# File lib/telegram_bot/out_message.rb, line 11 def send_with(bot) bot.send_message(self) end
to_h()
click to toggle source
# File lib/telegram_bot/out_message.rb, line 19 def to_h message = { text: text, chat_id: chat.id } message[:reply_to_message_id] = reply_to.id unless reply_to.nil? message[:parse_mode] = parse_mode unless parse_mode.nil? message[:disable_web_page_preview] = disable_web_page_preview unless disable_web_page_preview.nil? message[:reply_markup] = reply_markup.to_h.to_json unless reply_markup.nil? message end