diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ea743ff..795ed08c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,7 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fix Api Unknown error (Can't parse entities) on message created with `utils::markdown::user_mention_or_link` if user full name contaiins some escapable symbols eg '.' +- Fix Api Unknown error (Can't parse entities) on message created with `utils::markdown::user_mention_or_link` if user full name contains some escapable symbols eg '.' ## 0.9.1 - 2022-05-27 @@ -188,7 +188,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `BotCommand::bot_commands` to obtain Telegram API commands ([issue 262](https://github.com/teloxide/teloxide/issues/262)). -- The `dispatching2` and `prelude2` modules. They presents a new dispatching model based on `dptree`. +- The `dispatching2` and `prelude2` modules. They present a new dispatching model based on `dptree`. ### Changed @@ -265,7 +265,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Remove the `reqwest` dependency. It's not needed after the [teloxide-core] integration. -- A storage persistency bug ([issue 304](https://github.com/teloxide/teloxide/issues/304)). +- A storage persistence bug ([issue 304](https://github.com/teloxide/teloxide/issues/304)). - Log errors from `Storage::{remove_dialogue, update_dialogue}` in `DialogueDispatcher` ([issue 302](https://github.com/teloxide/teloxide/issues/302)). - Mark all the functions of `Storage` as `#[must_use]`. @@ -371,7 +371,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Now methods which can send file to Telegram returns `tokio::io::Result`. Early its could panic ([issue 216](https://github.com/teloxide/teloxide/issues/216)). +- Now methods which can send file to Telegram returns `tokio::io::Result`. Early it could panic ([issue 216](https://github.com/teloxide/teloxide/issues/216)). - If a bot wasn't triggered for several days, it stops responding ([issue 223](https://github.com/teloxide/teloxide/issues/223)). ## 0.2.0 - 2020-02-25 diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 83ea0829..1449cca1 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -193,7 +193,7 @@ In order to make `Dispatcher` implement `Send`, `DispatcherBuilder::{default_han v0.6 of teloxide introduces a new dispatching model based on the [chain of responsibility pattern]. To use it, you need to replace `prelude` with `prelude2` and `dispatching` with `dispatching2`. Instead of using old REPLs, you should now use `teloxide::repls2`. -The whole design is different than the previous one based on Tokio streams. In this section, we are only to address the most common usage scenarios. +The whole design is different from the previous one based on Tokio streams. In this section, we are only to address the most common usage scenarios. First of all, now there are no streams. Instead of using streams, you use [`dptree`], which is a more suitable alternative for our purposes. Thus, if you previously used `Dispatcher::messages_handler`, now you should use `Update::filter_message()`, and so on. @@ -237,7 +237,7 @@ List of changed types: In teloxide `v0.4` (core `v0.2`) some API methods had wrong return types. This made them practically unusable as they've always returned parsing error. -On the offchance you were using the methods, you may need to adjust types in your code. +On the off-chance you were using the methods, you may need to adjust types in your code. List of changed return types: - `get_chat_administrators`: `ChatMember` -> `Vec` @@ -324,7 +324,7 @@ List of renamed items: #### Added `impl Clone` for {`CacheMe`, `DefaultParseMode`, `Throttle`} Previously said bot adaptors were lacking `Clone` implementation. -To workaround this issue it was proposed to wrap bot in `Arc`. +To work around this issue it was proposed to wrap bot in `Arc`. Now it's not required, so you can remove the `Arc`: ```diff diff --git a/README.md b/README.md index 2fb0010a..795a4006 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ $ set TELOXIDE_TOKEN= $ $env:TELOXIDE_TOKEN= ``` - 4. Make sure that your Rust compiler is up to date (`teloxide` currently requires rustc at least version 1.64): + 4. Make sure that your Rust compiler is up-to-date (`teloxide` currently requires rustc at least version 1.64): ```bash # If you're using stable $ rustup update stable @@ -82,7 +82,7 @@ tokio = { version = "1.8", features = ["rt-multi-thread", "macros"] } ### The dices bot -This bot replies with a dice throw to each received message: +This bot replies with a die throw to each received message: [[`examples/throw_dice.rs`](examples/throw_dice.rs)] @@ -326,7 +326,7 @@ Feel free to propose your own bot to our collection! - [`modos189/tg_blackbox_bot`](https://gitlab.com/modos189/tg_blackbox_bot) — Anonymous feedback for your Telegram project. - [`0xNima/spacecraft`](https://github.com/0xNima/spacecraft) — Yet another telegram bot to downloading Twitter spaces. - [`0xNima/Twideo`](https://github.com/0xNima/Twideo) — Simple Telegram Bot for downloading videos from Twitter via their links. - - [`mattrighetti/libgen-bot-rs`](https://github.com/mattrighetti/libgen-bot-rs) — Telgram bot to interface with libgen. + - [`mattrighetti/libgen-bot-rs`](https://github.com/mattrighetti/libgen-bot-rs) — Telegram bot to interface with libgen. - [`zamazan4ik/npaperbot-telegram`](https://github.com/zamazan4ik/npaperbot-telegram) — Telegram bot for searching via C++ proposals.
diff --git a/examples/db_remember.rs b/examples/db_remember.rs index de09db0d..980d1357 100644 --- a/examples/db_remember.rs +++ b/examples/db_remember.rs @@ -91,7 +91,7 @@ async fn got_number( } Command::Reset => { dialogue.reset().await?; - bot.send_message(msg.chat.id, "Number resetted.").await?; + bot.send_message(msg.chat.id, "Number reset.").await?; } } Ok(()) diff --git a/examples/dispatching_features.rs b/examples/dispatching_features.rs index 983f0002..6ce059d9 100644 --- a/examples/dispatching_features.rs +++ b/examples/dispatching_features.rs @@ -32,7 +32,7 @@ async fn main() { .endpoint(simple_commands_handler), ) .branch( - // Filter a maintainer by a used ID. + // Filter a maintainer by a user ID. dptree::filter(|cfg: ConfigParameters, msg: Message| { msg.from().map(|user| user.id == cfg.bot_maintainer).unwrap_or_default() }) diff --git a/examples/heroku_ping_pong.rs b/examples/heroku_ping_pong.rs index 6fe50847..59767047 100644 --- a/examples/heroku_ping_pong.rs +++ b/examples/heroku_ping_pong.rs @@ -10,7 +10,7 @@ // heroku create --buildpack emk/rust // ``` // -// To set buildpack for existing applicaton: +// To set buildpack for existing application: // // ``` // heroku buildpacks:set emk/rust diff --git a/src/dispatching/update_listeners/polling.rs b/src/dispatching/update_listeners/polling.rs index 5fb863f0..ffe8aa5a 100644 --- a/src/dispatching/update_listeners/polling.rs +++ b/src/dispatching/update_listeners/polling.rs @@ -225,7 +225,7 @@ where /// /// C->>P: next /// -/// P->>T: *Acknolegment of update(5)* +/// P->>T: *Acknowledgement of update(5)* /// T->>P: ok /// /// P->>C: None diff --git a/src/utils/command.rs b/src/utils/command.rs index 2d16f23b..785479d7 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -91,7 +91,7 @@ pub use teloxide_macros::BotCommands; /// Change a prefix for all commands (the default is `/`). /// /// 3. `#[command(description = "description")]` -/// Add a sumary description of commands before all commands. +/// Add a summary description of commands before all commands. /// /// 4. `#[command(parse_with = "parser")]` /// Change the parser of arguments. Possible values: @@ -115,7 +115,7 @@ pub use teloxide_macros::BotCommands; /// # } /// ``` /// -/// - `split` - separates a messsage by a given separator (the default is the +/// - `split` - separates a message by a given separator (the default is the /// space character) and parses each part into the corresponding arguments, /// which must implement [`FromStr`]. /// @@ -412,9 +412,9 @@ where return None; } let mut words = text.split_whitespace(); - let mut splited = words.next()?[prefix.len()..].split('@'); - let command = splited.next()?; - let bot = splited.next(); + let mut split = words.next()?[prefix.len()..].split('@'); + let command = split.next()?; + let bot = split.next(); match bot { Some(name) if name.eq_ignore_ascii_case(bot_name.as_ref()) => {} None => {} @@ -485,7 +485,7 @@ impl Display for CommandDescriptions<'_> { } } -// The rest of tests are integrational due to problems with macro expansion in +// The rest of tests are integration due to problems with macro expansion in // unit tests. #[cfg(test)] mod tests { diff --git a/src/utils/html.rs b/src/utils/html.rs index 407f0792..d2243d5d 100644 --- a/src/utils/html.rs +++ b/src/utils/html.rs @@ -95,7 +95,7 @@ pub fn code_inline(s: &str) -> String { /// style. /// /// Does not escape ' and " characters (as should be for usual HTML), because -/// they shoudn't be escaped by the [spec]. +/// they shouldn't be escaped by the [spec]. /// /// [spec]: https://core.telegram.org/bots/api#html-style #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ @@ -176,7 +176,7 @@ mod tests { assert_eq!( code_block_with_lang( "

pre-'formatted'\n & fixed-width \\code `block`

", - "\"" + "\"", ), concat!( "
",
diff --git a/src/utils/markdown.rs b/src/utils/markdown.rs
index 9c355444..976e0ab4 100644
--- a/src/utils/markdown.rs
+++ b/src/utils/markdown.rs
@@ -38,7 +38,7 @@ pub fn italic(s: &str) -> String {
               without using its output does nothing useful"]
 pub fn underline(s: &str) -> String {
     // In case of ambiguity between italic and underline entities
-    // ‘__’ is always greadily treated from left to right as beginning or end of
+    // ‘__’ is always greedily treated from left to right as beginning or end of
     // underline entity, so instead of ___italic underline___ we should use
     // ___italic underline_\r__, where \r is a character with code 13, which
     // will be ignored.