Ruby wrapper for Telegram’s Bot API.
Add following line to your Gemfile:
And then execute:
Or install it system-wide:
First things first, you need to obtain a token for your bot. Then create your Telegram bot like this:
bot.api object implements Telegram Bot API methods as is. So you can invoke any method inside the block without any problems.
Same thing about
message object – it implements Message spec, so you always know what to expect from it.
You can use your own custom keyboards. Here is an example:
Your bot can even upload files (photos, audio, documents, stickers, video) to Telegram servers. Just like this: