telegant

Version, currently release1 version
  • releaselatestApr 20, 2025

github.com/Telegant/Telegant

Modern, elegant Telegram bot framework

19 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  telegant:
    github: Telegant/Telegant
    version: ~> release

Then run:

shards install

shard.yml

Crystal
>= 1.8.0
License
MIT
Author
Vladyslav Kotov <kotov.vladyslav649@protonmail.com>
Target
  • telegant from src/telegant.cr

Dependencies

Development Dependencies

  • ameba~> 1.4.0github: crystal-ameba/amebadev

README

<h1 align="center">Telegant</h1>

<p align="center">
  <a href="https://github.com/telegant/telegant/releases"><img src="https://img.shields.io/github/v/release/telegant/telegant?include_prereleases" alt="GitHub release"></a>
  <a href="https://crystal-lang.org/"><img src="https://img.shields.io/badge/built%20with-Crystal-black" alt="Built with Crystal"></a>
  <a href="https://github.com/yourusername/telegant/blob/main/LICENSE"><img src="https://img.shields.io/github/license/telegant/telegant" alt="License"></a>
</p>

<p align="center">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.</p>

## 🧩 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
To-do 

## πŸ’‘ Example
```crystal
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
To-do

## ❀️ Contribute
To-do

## πŸ—ΊοΈ Roadmap
To-do

## 🌐 Community
- [Join our Discord](https://discord.gg/nzjSdbjE)
- [Telegram Group](https://t.me/telegant_group)
- [Telegram Channel](https://t.me/telegant_official)