README.md in telegram-bot-ruby-0.2.2 vs README.md in telegram-bot-ruby-0.2.3
- old
+ new
@@ -70,9 +70,22 @@
bot.api.sendMessage(chat_id: message.chat.id, text: 'Sorry to see you go :(', reply_markup: kb)
end
end
```
+## File upload
+
+Your bot can even upload files to Telegram servers (i.e. https://core.telegram.org/bots/api#sendphoto). Just like this:
+
+```ruby
+bot.listen do |message|
+ case message.text
+ when /^\/photo$/
+ bot.api.sendPhoto(chat_id: message.chat.id, photo: File.new('~/Desktop/jennifer.jpg'))
+ end
+end
+```
+
## Contributing
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')