forgot to tweak readme!
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
# Telegram.Reactive
|
# Telegrator
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> **A modern reactive framework for Telegram bots in C# with aspect-oriented design, mediator-based dispatching, and flexible architecture.**
|
> **A modern reactive framework for Telegram bots in C# with aspect-oriented design, mediator-based dispatching, and flexible architecture.**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🚀 About Telegram.Reactive
|
## 🚀 About Telegrator
|
||||||
|
|
||||||
Telegram.Reactive is a next-generation framework for building Telegram bots in C#, inspired by AOP (Aspect-Oriented Programming) and the mediator pattern. It enables decentralized, easily extensible, and maintainable bot logic without traditional state machines or monolithic handlers.
|
Telegrator is a next-generation framework for building Telegram bots in C#, inspired by AOP (Aspect-Oriented Programming) and the mediator pattern. It enables decentralized, easily extensible, and maintainable bot logic without traditional state machines or monolithic handlers.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -40,14 +40,14 @@ Telegram.Reactive is a next-generation framework for building Telegram bots in C
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Coming soon: will be available via NuGet
|
# Coming soon: will be available via NuGet
|
||||||
# dotnet add package Telegram.Reactive
|
# dotnet add package Telegrator
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Minimal Bot Example
|
### 2. Minimal Bot Example
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using Telegram.Reactive.Handlers;
|
using Telegrator.Handlers;
|
||||||
using Telegram.Reactive.Annotations;
|
using Telegrator.Annotations;
|
||||||
|
|
||||||
[MessageHandler]
|
[MessageHandler]
|
||||||
public class HelloHandler : MessageHandler
|
public class HelloHandler : MessageHandler
|
||||||
@@ -68,8 +68,8 @@ bot.StartReceiving();
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using Telegram.Bot.Types.Enums;
|
using Telegram.Bot.Types.Enums;
|
||||||
using Telegram.Reactive.Handlers;
|
using Telegrator.Handlers;
|
||||||
using Telegram.Reactive.Annotations;
|
using Telegrator.Annotations;
|
||||||
|
|
||||||
[CommandHandler, CommandAllias("start", "hello"), ChatType(ChatType.Private)]
|
[CommandHandler, CommandAllias("start", "hello"), ChatType(ChatType.Private)]
|
||||||
public class StartCommandHandler : CommandHandler
|
public class StartCommandHandler : CommandHandler
|
||||||
@@ -87,8 +87,8 @@ bot.Handlers.AddHandler<StartCommandHandler>();
|
|||||||
### 4. State Management Example
|
### 4. State Management Example
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using Telegram.Reactive.Handlers;
|
using Telegrator.Handlers;
|
||||||
using Telegram.Reactive.Annotations;
|
using Telegrator.Annotations;
|
||||||
|
|
||||||
[CommandHandler, CommandAllias("first"), NumericState(SpecialState.NoState)]
|
[CommandHandler, CommandAllias("first"), NumericState(SpecialState.NoState)]
|
||||||
public class StateKeepFirst : CommandHandler
|
public class StateKeepFirst : CommandHandler
|
||||||
@@ -107,7 +107,7 @@ bot.Handlers.AddHandler<StateKeepFirst>();
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🏆 Why Telegram.Reactive over state machines?
|
## 🏆 Why Telegrator over state machines?
|
||||||
|
|
||||||
- **No tangled switch/case**—logic is split into independent handlers.
|
- **No tangled switch/case**—logic is split into independent handlers.
|
||||||
- **Flexible dispatching**—the mediator decides who and when processes an event.
|
- **Flexible dispatching**—the mediator decides who and when processes an event.
|
||||||
@@ -119,8 +119,8 @@ bot.Handlers.AddHandler<StateKeepFirst>();
|
|||||||
|
|
||||||
## 📚 Documentation & Examples
|
## 📚 Documentation & Examples
|
||||||
|
|
||||||
- [Documentation (in progress)](https://github.com/Rikitav/Telegram.Reactive/wiki/)
|
- [Documentation (in progress)](https://github.com/Rikitav/Telegrator/wiki/)
|
||||||
- [Usage examples](https://github.com/Rikitav/Telegram.Reactive/tree/master/Examples)
|
- [Usage examples](https://github.com/Rikitav/Telegrator/tree/master/Examples)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user