mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 09:49:07 +01:00
HandlerExt::add_dialogue
=> HandlerExt::enter_dialogue
This commit is contained in:
parent
8eb8e3c720
commit
e5330cdec2
5 changed files with 6 additions and 6 deletions
|
@ -223,7 +223,7 @@ async fn main() {
|
|||
DispatcherBuilder::new(
|
||||
bot,
|
||||
Update::filter_message()
|
||||
.add_dialogue::<Message, InMemStorage<State>, State>()
|
||||
.enter_dialogue::<Message, InMemStorage<State>, State>()
|
||||
.dispatch_by::<State>(),
|
||||
)
|
||||
.dependencies(dptree::deps![InMemStorage::<State>::new()])
|
||||
|
|
|
@ -49,7 +49,7 @@ async fn main() {
|
|||
DispatcherBuilder::new(
|
||||
bot,
|
||||
Update::filter_message()
|
||||
.add_dialogue::<Message, InMemStorage<State>, State>()
|
||||
.enter_dialogue::<Message, InMemStorage<State>, State>()
|
||||
.dispatch_by::<State>(),
|
||||
)
|
||||
.dependencies(dptree::deps![InMemStorage::<State>::new()])
|
||||
|
|
|
@ -44,7 +44,7 @@ async fn main() {
|
|||
let storage = RedisStorage::open("redis://127.0.0.1:6379", Bincode).await.unwrap();
|
||||
|
||||
let handler = Update::filter_message()
|
||||
.add_dialogue::<Message, RedisStorage<Bincode>, State>()
|
||||
.enter_dialogue::<Message, RedisStorage<Bincode>, State>()
|
||||
.dispatch_by::<State>();
|
||||
|
||||
DispatcherBuilder::new(bot, handler)
|
||||
|
|
|
@ -40,7 +40,7 @@ async fn main() {
|
|||
let storage = SqliteStorage::open("db.sqlite", Json).await.unwrap();
|
||||
|
||||
let handler = Update::filter_message()
|
||||
.add_dialogue::<Message, SqliteStorage<Json>, State>()
|
||||
.enter_dialogue::<Message, SqliteStorage<Json>, State>()
|
||||
.dispatch_by::<State>();
|
||||
|
||||
DispatcherBuilder::new(bot, handler)
|
||||
|
|
|
@ -24,7 +24,7 @@ pub trait HandlerExt<Output> {
|
|||
C: BotCommand + Send + Sync + 'static;
|
||||
|
||||
#[must_use]
|
||||
fn add_dialogue<Upd, S, D>(self) -> Self
|
||||
fn enter_dialogue<Upd, S, D>(self) -> Self
|
||||
where
|
||||
S: Storage<D> + Send + Sync + 'static,
|
||||
<S as Storage<D>>::Error: Send,
|
||||
|
@ -51,7 +51,7 @@ where
|
|||
}))
|
||||
}
|
||||
|
||||
fn add_dialogue<Upd, S, D>(self) -> Self
|
||||
fn enter_dialogue<Upd, S, D>(self) -> Self
|
||||
where
|
||||
S: Storage<D> + Send + Sync + 'static,
|
||||
<S as Storage<D>>::Error: Send,
|
||||
|
|
Loading…
Reference in a new issue