Class: Ehbrs::Tools::Telegram::MessageSending

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

Instance Method Summary collapse

Instance Method Details

#runObject



11
12
13
14
15
16
17
# File 'lib/ehbrs/tools/telegram/message_sending.rb', line 11

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