README.md in te_bot-0.2.0 vs README.md in te_bot-0.3.0
- old
+ new
@@ -8,11 +8,11 @@
## Installation
Install the gem and add to the application's Gemfile
- gem 'te_bot', '~> 0.2.0'
+ gem 'te_bot', '~> 0.3.0'
Then run
bundle install
@@ -87,22 +87,22 @@
message = do_some_fancy_stuff_here(conn)
conn.reply text: message
end
end
```
-And also we can define a macro for defaul action `#default_action` if the request does not match with this [Documentation](https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates), Or we have not create the handler for that specific message type.
+And also we can define a macro for default action `#default_action` if the request does not match with this [Documentation](https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates), Or we have not created the handler for that specific message type.
```rb
# app.rb
class MyWebhookApp < TeBot::Court
default_action do |conn|
conn.reply text: "No, I can't talk like people. use command instead"
end
end
```
-Since this app implements rack interface, and railr is also a rack based application. We can mount this app direcly inside rails app.
+Since this app implements rack interface, and rails is also a rack based application. We can mount this app direcly inside rails app.
```rb
# config/routes.rb
require "lib/to/your_webhook"
@@ -112,12 +112,12 @@
end
```
### Sending Message to Telegram
To send message direcly to telegram, we can use this module `TeBot::Wire`
-and need to require `"te_bot/sender_options"` to add default handler for different type of message.
-Available message types are `:text`, `:markdown`, `:photo`, `:audio`, `:document`, `:video`, `:animation`, `:voice`
+and need to require `"te_bot/sender_options"` to add default handler for different type of messages.
+Available message types are `:text`, `:markdown`, `:photo`, `:audio`, `:document`, `:video`, `:animation` amd `:voice`
Some supported message by default:
```rb
# app.rb
sender = TeBot::Wire.new(ENV['YOUR_ACCESS_TOKEN_HERE'])
@@ -133,10 +133,10 @@
```
For markdown telegram supports MArkdownV2 [refer to this](https://core.telegram.org/bots/api#markdownv2-style)
Please check the [documentation](https://core.telegram.org/bots/api#sendmessage) for more details.
-Of course you add more handler by extending the `TeBot::Wire` class
+Of course you can add more handler by extending the `TeBot::Wire` class
```ruby
# in/your/custom_handler.rb
TeBot::Wire.class_eval do