Class: Ehbrs::Telegram::MessageSending

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs/telegram/message_sending.rb

Instance Method Summary collapse

Instance Method Details

#runObject



13
14
15
16
17
18
19
# File 'lib/ehbrs/telegram/message_sending.rb', line 13

def run
  ::Telegram::Bot::Client.run(prop(:bot_token)) do |bot|
    prop(:recipient_ids).each do |recipient_id|
      bot.api.sendMessage(chat_id: recipient_id, text: prop(:message))
    end
  end
end