diff --git a/CHANGELOG.md b/CHANGELOG.md index 513e536d..5f6c5e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,11 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - - `teloxide::dispatching::repls::CommandRepl`, `teloxide::prelude::CommandRepl` ([issue #740](https://github.com/teloxide/teloxide/issues/740)) + - `teloxide::dispatching::repls::CommandReplExt`, `teloxide::prelude::CommandReplExt` ([issue #740](https://github.com/teloxide/teloxide/issues/740)) ### Deprecated - - `teloxide::dispatching::repls::{commands_repl, commands_repl_with_listener}`, `teloxide::utils::command::BotCommands::ty` (use `CommandRepl` instead) + - `teloxide::dispatching::repls::{commands_repl, commands_repl_with_listener}`, `teloxide::utils::command::BotCommands::ty` (use `CommandReplExt` instead) ## 0.11.0 - 2022-10-07 diff --git a/src/dispatching/repls.rs b/src/dispatching/repls.rs index e8e6c4ac..aea4806e 100644 --- a/src/dispatching/repls.rs +++ b/src/dispatching/repls.rs @@ -11,7 +11,7 @@ mod commands_repl; mod repl; -pub use commands_repl::CommandRepl; +pub use commands_repl::CommandReplExt; #[allow(deprecated)] pub use commands_repl::{commands_repl, commands_repl_with_listener}; pub use repl::{repl, repl_with_listener}; diff --git a/src/dispatching/repls/commands_repl.rs b/src/dispatching/repls/commands_repl.rs index 5cbecd5b..15f2396d 100644 --- a/src/dispatching/repls/commands_repl.rs +++ b/src/dispatching/repls/commands_repl.rs @@ -65,10 +65,10 @@ use std::{fmt::Debug, marker::PhantomData}; #[doc = include_str!("caution.md")] /// #[cfg(feature = "ctrlc_handler")] -pub trait CommandRepl { +pub trait CommandReplExt { /// A REPL for commands. /// - /// See [`CommandRepl`] for more details. + /// See [`CommandReplExt`] for more details. #[must_use] fn repl<'a, R, H, Args>(bot: R, handler: H) -> BoxFuture<'a, ()> where @@ -81,7 +81,7 @@ pub trait CommandRepl { /// A REPL for commands with a custom [`UpdateListener`]. /// - /// See [`CommandRepl`] for more details. + /// See [`CommandReplExt`] for more details. #[must_use] fn repl_with_listener<'a, R, H, L, Args>(bot: R, handler: H, listener: L) -> BoxFuture<'a, ()> where @@ -93,7 +93,7 @@ pub trait CommandRepl { } #[cfg(feature = "ctrlc_handler")] -impl CommandRepl for Cmd +impl CommandReplExt for Cmd where Cmd: BotCommands + Send + Sync + 'static, { diff --git a/src/prelude.rs b/src/prelude.rs index 499eaea7..ca6afa90 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -6,7 +6,7 @@ pub use crate::error_handlers::{LoggingErrorHandler, OnError}; pub use crate::respond; pub use crate::dispatching::{ - dialogue::Dialogue, repls::CommandRepl as _, Dispatcher, HandlerExt as _, + dialogue::Dialogue, repls::CommandReplExt as _, Dispatcher, HandlerExt as _, MessageFilterExt as _, UpdateFilterExt as _, }; diff --git a/src/utils/command.rs b/src/utils/command.rs index 9c9814eb..8f96998e 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -235,7 +235,7 @@ pub trait BotCommands: Sized { /// /// [`commands_repl`]: (crate::repls::commands_repl) #[must_use] - #[deprecated(note = "Use `CommandRepl` instead")] + #[deprecated(note = "Use `CommandReplExt` instead")] fn ty() -> PhantomData { PhantomData }