Class: Ehbrs::Telegram::MessageSending

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

Instance Method Summary collapse

Instance Method Details

#runObject



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

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