telegant

Modern, elegant Telegram bot framework
HEAD Latest release released

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

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

telegant:
  github: telegant/telegant
  
License MIT
Crystal >= 1.8.0

Authors

Dependencies 0

Development Dependencies 1

  • ameba ~> 1.4.0
    {'github' => 'crystal-ameba/ameba', 'version' => '~> 1.4.0'}

Dependents 0

Last synced .
search fire star recently