telegram-bot-ruby 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78b3239cfaec3cd066e216eb93e9de6bc297636e
4
- data.tar.gz: fe4dca782da5b1a22539943158fcdc9f573d27ea
3
+ metadata.gz: b0f238cefd205500522307dccb130ef0993bfd8a
4
+ data.tar.gz: 115bc4c3bb59e94f67842810ab95ed1f7d21aae5
5
5
  SHA512:
6
- metadata.gz: 6ef6457d157c9fd7ee158e36d88a9708192aaf629d191be0f5f4b6c21b5dbae088119b4d7ad2ab11bf7d20ab229fbc2be63b0af3980f99d52bc36ca27b285ed4
7
- data.tar.gz: 4c91802a720df20bf90dd7417f0f15f01c8f40999dbd5a9d2444a52f13b73e829ba39bc615f296f36ea85e7f7730b1291747a2000a699f929f22026e6baa94e2
6
+ metadata.gz: 7419c4a6c6ca6fec3c8132f7734307ccf10640ffb2d6e58b3e019ad11577b29485c5a02a3b9cf6ed603daae39fd0fbccb573e7fcf5ec70c53800639041c11032
7
+ data.tar.gz: 66fdc42963a0e8847b187eaaab4307383cf9b378ae470d2bb59dc8c403b1adbda21a4c7229e668212b8cd9d890d2a07d27265514429808a8bb3a6b8f4e9ffd25
data/README.md CHANGED
@@ -38,9 +38,9 @@ Telegram::Bot::Client.run(token) do |bot|
38
38
  bot.listen do |message|
39
39
  case message.text
40
40
  when '/start'
41
- bot.api.sendMessage(chat_id: message.chat.id, text: "Hello, #{message.from.username}")
41
+ bot.api.sendMessage(chat_id: message.chat.id, text: "Hello, #{message.from.first_name}")
42
42
  when '/stop'
43
- bot.api.sendMessage(chat_id: message.chat.id, text: "Bye, #{message.from.username}")
43
+ bot.api.sendMessage(chat_id: message.chat.id, text: "Bye, #{message.from.first_name}")
44
44
  end
45
45
  end
46
46
  end
data/examples/bot.rb CHANGED
@@ -7,9 +7,9 @@ Telegram::Bot::Client.run(token) do |bot|
7
7
  bot.listen do |message|
8
8
  case message.text
9
9
  when '/start'
10
- bot.api.sendMessage(chat_id: message.chat.id, text: "Hello, #{message.from.username}!")
10
+ bot.api.sendMessage(chat_id: message.chat.id, text: "Hello, #{message.from.first_name}!")
11
11
  when '/end'
12
- bot.api.sendMessage(chat_id: message.chat.id, text: "Bye, #{message.from.username}!")
12
+ bot.api.sendMessage(chat_id: message.chat.id, text: "Bye, #{message.from.first_name}!")
13
13
  else
14
14
  bot.api.sendMessage(chat_id: message.chat.id, text: "I don't understand you :(")
15
15
  end
@@ -28,6 +28,8 @@ module Telegram
28
28
  yield update.message
29
29
  end
30
30
  end
31
+ rescue Net::ReadTimeout
32
+ retry
31
33
  end
32
34
  end
33
35
  end
@@ -1,5 +1,5 @@
1
1
  module Telegram
2
2
  module Bot
3
- VERSION = '0.2.5'
3
+ VERSION = '0.2.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2015-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httmultiparty