{"repo":"atipugin/telegram-bot-ruby","free":true,"listed":false,"github":"https://github.com/atipugin/telegram-bot-ruby","clone":"git clone https://github.com/atipugin/telegram-bot-ruby.git","description":"Ruby wrapper for Telegram's Bot API","language":"Ruby","stars":1425,"topics":["telegram","telegram-bot","ruby"],"license":"WTFPL","category":"chat-messaging","readme_excerpt":"telegram-bot-ruby Ruby wrapper for Telegram's Bot API. Installation Add following line to your Gemfile: And then execute: Or install it system-wide: Usage First things first, you need to obtain a token for your bot. Then create your Telegram bot like this: Note that bot.api object implements Telegram Bot API methods as is. So you can invoke any method inside the block without any problems. All methods are available in both snake case and camelCase notations. If you need to start a bot in development mode you have to pass environment: :test : Same thing about message object: it implements Message spec, so you always know what to expect from it. To gracefully stop the bot, for example by INT signal (Ctrl-C), call the bot.stop method: Webhooks If you are going to use webhooks instead of long polling, you need to implement your own webhook callbacks server. Take a look at this repo as an example. Proxy As some countries block access to Telegram, you can set up your own proxy and use it to access Telegram API. In this case you need to configure API URL: If you want to use a SOCKS5 proxy with the Excon adapter, you can configure it like this: Custom keyboards You can use your own custom keyboards. Here is an example: Furthermore, you can ask user to share location or phone number using KeyboardButton : Inline keyboards Bot API 2.0 brought us new inline keyboards. Example: Inline bots If you are going to create inline bot, check the example below: Now, with inline mode enabled, your","default_branch":null,"files":null,"tree":[],"storefront":"/r/atipugin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/atipugin/telegram-bot-ruby/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}