[ruby-talk:444838] [ANN] Telegem 3.5.0 – Pure Async Telegram Bot Framework for Ruby
Hello Rubyists, I'm excited to announce Telegem 3.5.0, a modern Telegram Bot Framework for Ruby built with async-first design. Why Telegem? · Pure async architecture using async-http – no thread headaches, just efficient fiber-based concurrency · Scenes system for multi-step conversations (wizards, forms, onboarding flows) · Clean DSL inspired by Telegraf.js – expressive and intuitive · Middleware support for logging, auth, caching, and more · Webhook-first design – production-ready with one line: bot.webhook.run Quick Example (60 seconds to your first bot): ```ruby require 'telegem' bot = Telegem.new(ENV['BOT_TOKEN']) bot.command('start') do |ctx| ctx.reply "Hello #{ctx.from.first_name}! 👋" end bot.start_polling # Development # or bot.webhook.run # Production ``` Scene Example (multi-step conversation): ```ruby bot.scene :order_pizza do step :choose_size do |ctx| ctx.reply("Small, Medium, or Large?") end step :choose_toppings do |ctx| ctx.session[:size] = ctx.message.text ctx.reply("What toppings?") end step :confirm do |ctx| ctx.session[:toppings] = ctx.message.text ctx.reply("Order placed! 🍕") ctx.leave_scene end end ``` **Key Features:** - **Async I/O** – ~5MB memory per 1000 concurrent users - **Real-world examples** – pizza bot, crypto tracker, support ticket system included - **Cloud-smart webhooks** – auto-detects Render, Railway, Heroku, Fly.io - **Ruby 3.3+ compatible** - **MIT licensed** **Links:** - **RubyGems:** `gem install telegem` or https://rubygems.org/gems/telegem [citation:1][citation:5] - **GitHub:** https://github.com/slick-lab/telegem - **Documentation:** https://slick-lab.github.io/telegem/ - **Examples:** Check the `examples/` directory in the repo I'd love feedback, issues, and contributions. Let me know what you build with it! Cheers, @zendrx
participants (1)
-
phåńtøm šłîçk