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
14 15 16 |
# File 'lib/telegram_bot/out_message.rb', line 14 def chat_friendly_name chat.friendly_name end |
#send_with(bot) ⇒ Object
10 11 12 |
# File 'lib/telegram_bot/out_message.rb', line 10 def send_with(bot) bot.(self) end |
#to_h ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/telegram_bot/out_message.rb', line 18 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? end |