Telegant release

Modern, elegant Telegram bot framework for Crystal

Telegant Logo

Telegant

GitHub release Built with Crystal License

Telegant is a feature-rich Telegram bot framework specifically built for Crystal. Built with beauty and scalability in mind, it offers a simple syntax for creating complicated bot interactions while retaining Crystal's efficiency benefits.

🧩 Features

  • ✨ Elegant annotation-based API - Define handlers with Crystal annotations
  • πŸ›‘οΈ Middleware system - Add customized logic, such as rate limitation, logging, or access restriction
  • πŸ”Œ Attachable middleware - Add middleware to specified handlers
  • πŸ“Š Context - Easy access to the current update properties and API calls
  • πŸ”‘ State management - Integrated user state management for complicated interactions
  • πŸ“‘ Dialog management - Create multi-step conversations with built-in state management

πŸ”¨ Installation

Add Telegant to your shard.yml:

telegant:
  github: telegant/telegant
  branch: release/v0.0.1

Then run:

shards install

πŸ’‘ Example

require "telegant"

class MyBot < Telegant::Bot
  @[Hears("hi", "hello")]
  def on_greet(update, bot)
    bot.reply("Hey there!")
  end
end

bot = MyBot.new("YOUR_BOT_TOKEN")
bot.start()

πŸ“– Documentation

https://crystaldoc.info/github/Telegant/Telegant/main/index.html

❀️ Contribute

To-do

πŸ—ΊοΈ Roadmap

To-do

🌐 Community

Repository

Telegant

Owner
Statistic
  • 13
  • 1
  • 0
  • 0
  • 1
  • 20 days ago
  • April 19, 2025
License

MIT License

Links
Synced at

Sat, 17 May 2025 23:49:11 GMT

Languages