Skip to content

Commit

Permalink
#1 thread
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 8, 2018
1 parent d7f9e9b commit adfc517
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ Then, use it like this:
require 'telepost'
require 'logger'
tp = Telepost.new('..token..')
tp.run do |chat, msg|
tp.post(chat: chat, 'Thanks for talking to me!')
Thread.start do
tp.run do |chat, msg|
tp.post(chat: chat, 'Thanks for talking to me!')
end
end
tp.post(chat: 12345, 'How are you?', 'How are you doing?')
```
Expand Down

0 comments on commit adfc517

Please sign in to comment.