diff --git a/README.md b/README.md index 1cb62b3b..7783129f 100644 --- a/README.md +++ b/README.md @@ -93,17 +93,6 @@ async fn main() { ``` -
- Click here to run it! - -```bash -git clone https://github.com/teloxide/teloxide.git -cd teloxide/examples/ping_pong_bot -TELOXIDE_TOKEN= cargo run -``` - -
-
@@ -161,17 +150,6 @@ async fn main() { } ``` -
- Click here to run it! - -```bash -git clone https://github.com/teloxide/teloxide.git -cd teloxide/examples/simple_commands_bot -TELOXIDE_TOKEN= cargo run -``` - -
-
@@ -179,7 +157,6 @@ TELOXIDE_TOKEN= cargo run

- See? The dispatcher gives us a stream of messages, so we can handle it as we want! Here we use our `.commands::()` and [`.for_each_concurrent()`](https://docs.rs/futures/0.3.4/futures/stream/trait.StreamExt.html#method.for_each_concurrent), but others are also available: - [`.flatten()`](https://docs.rs/futures/0.3.4/futures/stream/trait.StreamExt.html#method.flatten) - [`.left_stream()`](https://docs.rs/futures/0.3.4/futures/stream/trait.StreamExt.html#method.left_stream) @@ -261,17 +238,6 @@ async fn main() { } ``` -
- Click here to run it! - -```bash -git clone https://github.com/teloxide/teloxide.git -cd teloxide/examples/guess_a_number_bot -TELOXIDE_TOKEN= cargo run -``` - -
-
diff --git a/src/dispatching/dispatcher_handler_rx_ext.rs b/src/dispatching/dispatcher_handler_rx_ext.rs index 57f6782a..8e691721 100644 --- a/src/dispatching/dispatcher_handler_rx_ext.rs +++ b/src/dispatching/dispatcher_handler_rx_ext.rs @@ -5,7 +5,7 @@ use futures::{stream::BoxStream, Stream, StreamExt}; /// An extension trait to be used with [`DispatcherHandlerRx`]. /// -/// [`DispatcherHandlerRx`]: crate:dispatching::DispatcherHandlerRx +/// [`DispatcherHandlerRx`]: crate::dispatching::DispatcherHandlerRx pub trait DispatcherHandlerRxExt { /// Extracts only text messages from this stream of arbitrary messages. fn text_messages( diff --git a/src/dispatching/mod.rs b/src/dispatching/mod.rs index e00bf008..20bd9485 100644 --- a/src/dispatching/mod.rs +++ b/src/dispatching/mod.rs @@ -20,7 +20,7 @@ //! ``` //! //! When [`Update`] is received from Telegram, [`Dispatcher`] pushes it into an -//! appropriate handler. That's simple! +//! appropriate handler, depending on its kind. That's simple! //! //! **Note** that handlers must implement [`DispatcherHandler`], which means //! that: diff --git a/src/lib.rs b/src/lib.rs index 5910573e..81da243e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,21 +2,7 @@ //! using the [`async`/`.await`] syntax in [Rust]. It handles all the difficult //! stuff so you can focus only on your business logic. //! -//! # Features -//! - **Type-safe.** teloxide leverages the Rust's type system with two serious -//! implications: resistance to human mistakes and tight integration with -//! IDEs. Write fast, avoid debugging as much as possible. -//! -//! - **Flexible API.** teloxide gives you the power of [streams]: you can -//! combine [all 30+ patterns] when working with updates from Telegram. -//! -//! - **Persistency.** By default, teloxide stores all user dialogues in RAM, -//! but you can store them somewhere else (for example, in DB) just by -//! implementing 2 functions. -//! -//! - **Convenient dialogues system.** Define a type-safe [finite automaton] -//! and transition functions to drive a user dialogue with ease (see [the -//! guess-a-number example](#guess-a-number) below). +//! See also [our GitHub repository](https://github.com/teloxide/teloxide). //! //! # Getting started //! 1. Create a new bot using [@Botfather] to get a token in the format @@ -72,17 +58,6 @@ //! } //! ``` //! -//!
-//! Click here to run it! -//! -//! ```text -//! git clone https://github.com/teloxide/teloxide.git -//! cd teloxide/examples/ping_pong_bot -//! TELOXIDE_TOKEN= cargo run -//! ``` -//! -//!
-//! //!
//! //! @@ -151,17 +126,6 @@ //! } //! ``` //! -//!
-//! Click here to run it! -//! -//! ```text -//! git clone https://github.com/teloxide/teloxide.git -//! cd teloxide/examples/simple_commands_bot -//! TELOXIDE_TOKEN= cargo run -//! ``` -//! -//!
-//! //!
//! //! @@ -273,17 +237,6 @@ //! } //! ``` //! -//!
-//! Click here to run it! -//! -//! ```text -//! git clone https://github.com/teloxide/teloxide.git -//! cd teloxide/examples/guess_a_number_bot -//! TELOXIDE_TOKEN= cargo run -//! ``` -//! -//!
-//! //!
//! //! @@ -301,9 +254,7 @@ //! (`Dialogue::Start` has `()`, `Dialogue::ReceiveAttempt` has `u8`). //! //! See [examples/dialogue_bot] to see a bit more complicated bot with -//! dialogues. -//! -//! # [More examples!](https://github.com/teloxide/teloxide/tree/master/examples) +//! dialogues. [See all examples](https://github.com/teloxide/teloxide/tree/master/examples). //! //! # Recommendations //! @@ -347,8 +298,9 @@ //! [category theory]: https://en.wikipedia.org/wiki/Category_theory //! [coproduct]: https://en.wikipedia.org/wiki/Coproduct +// https://github.com/teloxide/teloxide/raw/master/logo.svg doesn't work in html_logo_url, I don't know why. #![doc( - html_logo_url = "https://github.com/teloxide/teloxide/raw/master/logo.svg", + html_logo_url = "https://github.com/teloxide/teloxide/raw/master/ICON.png", html_favicon_url = "https://github.com/teloxide/teloxide/raw/master/ICON.png" )] #![allow(clippy::match_bool)]