Class: TelegramBot::OutMessage
- Inherits:
-
Object
- Object
- TelegramBot::OutMessage
- Defined in:
- lib/telegram_bot/out_message.rb
Instance Method Summary collapse
Instance Method Details
#chat_friendly_name ⇒ Object
15 16 17 |
# File 'lib/telegram_bot/out_message.rb', line 15 def chat_friendly_name chat.friendly_name end |
#send_with(bot) ⇒ Object
11 12 13 |
# File 'lib/telegram_bot/out_message.rb', line 11 def send_with(bot) bot.(self) end |
#to_h ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/telegram_bot/out_message.rb', line 19 def to_h = { text: text, chat_id: chat.id } [:reply_to_message_id] = reply_to.id unless reply_to.nil? [:parse_mode] = parse_mode unless parse_mode.nil? [:disable_web_page_preview] = disable_web_page_preview unless disable_web_page_preview.nil? [:reply_markup] = reply_markup.to_h.to_json unless reply_markup.nil? end |