Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Jan 7, 2024
1 parent 21324ad commit b9e0fae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,25 @@ An asynchronous framework for Telegram Bot API written in Rust

<b>Telers make it easy to create Telegram bots</b> in Rust.

Make sure you have a basic understanding of the [Telegram Bot API](https://core.telegram.org/bots/api) before you start, because **all types and methods in telers have the same fields and types as in Telegram Bot API**.
Before you start, make sure that you have a basic understanding of the [Telegram Bot API](https://core.telegram.org/bots/api), because types and methods in the library have the same fields and types as in the documentation.

## Highlights
- **Asynchronous**. Telers is built on top of [Tokio](https://tokio.rs), a powerful asynchronous runtime for Rust.
- **Easy to use**. Telers provides a simple and intuitive API to create Telegram bots.
- **Based on** [aiogram](https://github.com/aiogram/aiogram). Telers is inspired by [aiogram](https://github.com/aiogram/aiogram), a Python framework for Telegram Bot API. Telers tries to provide the same API as aiogram, so if you know aiogram, you can easily start using this framework.
- **Middlewares**, **Filters** and **Handlers**. Telers provides a powerful system of middlewares, filters and handlers. You can use middlewares to modify incoming/outgoing updates (logging, database connections, etc.), filters to filter incoming updates and handlers to handle incoming updates.
- **Powerful extractors**. Telers provides a simple system of extractors. You can use extractors to extract data from incoming updates and context (middlewares, filters, etc.), and pass it to your handlers directly.
- **Multiple bots**. Telers allows you to create multiple bots in one application without any problems.
- **Asynchronous**. Built on top of [Tokio](https://tokio.rs/), a powerful asynchronous runtime.
- **Easy to use**. Provides a simple and intuitive API for creating bots.
- **Based on** [aiogram](https://github.com/aiogram/aiogram/). Inspired by the framework written in Python and tries to provide a similar functionality.
- **Routes**, **Middlewares**, **Filters** and **Handlers**. Provides a powerful system of routes, middlewares, filters and handlers to make your code more readable and maintainable, and simplify the creation of bots.
- **Extractors**. Have similar system of extractors as in [axum](https://docs.rs/axum/latest/axum/extract/) and [actix](https://actix.rs/docs/extractors/).

## Examples
- [Echo bot](examples/echo_bot). This example shows how to create a echo bot.
- [Echo bot](examples/echo_bot). This example shows how to create an echo bot.
- [Text formatting](examples/text_formatting). This example shows how to format text.
- [Text case filters](examples/text_case_filters). This example shows how to create text case filters.
- [Stats updates middleware](examples/stats_incoming_updates_middleware). This example shows how to create a middleware that counter incoming updates.
- [Stats updates middleware](examples/stats_incoming_updates_middleware). This example shows how to create a middleware that count incoming updates.
- [Input file](examples/input_file). This example shows how to send files by the bot.
- [Finite state machine](examples/finite_state_machine). This example shows how to use a finite state machine (conversation).
- [Router tree](examples/router_tree). This example shows how to send files by the bot.
- [Router tree](examples/router_tree). This example shows how to create a router tree.
- [Bot http client](examples/bot_http_client). This example shows how to set a custom bot HTTP client.
- [Axum and echo bot](examples/axum_and_echo_bot). This example shows how to create a echo bot and how to run it parallel with polling axum server.
- [Axum and echo bot](examples/axum_and_echo_bot). This example shows how to create an echo bot and run it concurrently with polling `axum` server.

You may consider checking out [this directory](examples) for more examples.

Expand Down
2 changes: 1 addition & 1 deletion examples/axum_and_echo_bot/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This example shows how to create a echo bot and how to run it parallel with polling axum server.
//! This example shows how to create an echo bot and how to run it concurrently with polling `axum` server.
//!
//! You can run this example by setting `BOT_TOKEN` and optional `RUST_LOG` environment variable and running:
//! ```bash
Expand Down
2 changes: 1 addition & 1 deletion examples/echo_bot/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This example shows how to create a echo bot, which will repeat all messages, which it receives.
//! This example shows how to create an echo bot, which will repeat all messages, which it receives.
//!
//! You can run this example by setting `BOT_TOKEN` and optional `RUST_LOG` environment variable and running:
//! ```bash
Expand Down
2 changes: 1 addition & 1 deletion examples/stats_incoming_updates_middleware/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This example shows how to create a middleware that counter incoming updates and processed handlers.
//! This example shows how to create a middleware that count incoming updates and processed handlers.
//! [`IncomingUpdates`] middleware counter increments when an update arrives.
//! [`ProcessedHandlers`] middleware counter increments when a handler successfully processed.
//! Every counterer is passes to the handler in the context.
Expand Down

0 comments on commit b9e0fae

Please sign in to comment.