Class: TelegramBot::OutMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/telegram_bot/out_message.rb

Instance Method Summary collapse

Instance Method Details

#chat_friendly_nameObject



11
12
13
# File 'lib/telegram_bot/out_message.rb', line 11

def chat_friendly_name
  chat.friendly_name
end

#send_with(bot) ⇒ Object



7
8
9
# File 'lib/telegram_bot/out_message.rb', line 7

def send_with(bot)
  bot.send_message(self)
end

#to_hObject



15
16
17
18
19
20
# File 'lib/telegram_bot/out_message.rb', line 15

def to_h
  {
    text: text,
    chat_id: chat.id
  }
end