mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
parent
9b8e21231c
commit
5532a4cd87
5 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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<Cmd> CommandRepl for Cmd
|
||||
impl<Cmd> CommandReplExt for Cmd
|
||||
where
|
||||
Cmd: BotCommands + Send + Sync + 'static,
|
||||
{
|
||||
|
|
|
@ -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 _,
|
||||
};
|
||||
|
||||
|
|
|
@ -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<Self> {
|
||||
PhantomData
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue