mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +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(
|
DispatcherBuilder::new(
|
||||||
bot,
|
bot,
|
||||||
Update::filter_message()
|
Update::filter_message()
|
||||||
.add_dialogue::<Message, InMemStorage<State>, State>()
|
.enter_dialogue::<Message, InMemStorage<State>, State>()
|
||||||
.dispatch_by::<State>(),
|
.dispatch_by::<State>(),
|
||||||
)
|
)
|
||||||
.dependencies(dptree::deps![InMemStorage::<State>::new()])
|
.dependencies(dptree::deps![InMemStorage::<State>::new()])
|
||||||
|
|
|
@ -49,7 +49,7 @@ async fn main() {
|
||||||
DispatcherBuilder::new(
|
DispatcherBuilder::new(
|
||||||
bot,
|
bot,
|
||||||
Update::filter_message()
|
Update::filter_message()
|
||||||
.add_dialogue::<Message, InMemStorage<State>, State>()
|
.enter_dialogue::<Message, InMemStorage<State>, State>()
|
||||||
.dispatch_by::<State>(),
|
.dispatch_by::<State>(),
|
||||||
)
|
)
|
||||||
.dependencies(dptree::deps![InMemStorage::<State>::new()])
|
.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 storage = RedisStorage::open("redis://127.0.0.1:6379", Bincode).await.unwrap();
|
||||||
|
|
||||||
let handler = Update::filter_message()
|
let handler = Update::filter_message()
|
||||||
.add_dialogue::<Message, RedisStorage<Bincode>, State>()
|
.enter_dialogue::<Message, RedisStorage<Bincode>, State>()
|
||||||
.dispatch_by::<State>();
|
.dispatch_by::<State>();
|
||||||
|
|
||||||
DispatcherBuilder::new(bot, handler)
|
DispatcherBuilder::new(bot, handler)
|
||||||
|
|
|
@ -40,7 +40,7 @@ async fn main() {
|
||||||
let storage = SqliteStorage::open("db.sqlite", Json).await.unwrap();
|
let storage = SqliteStorage::open("db.sqlite", Json).await.unwrap();
|
||||||
|
|
||||||
let handler = Update::filter_message()
|
let handler = Update::filter_message()
|
||||||
.add_dialogue::<Message, SqliteStorage<Json>, State>()
|
.enter_dialogue::<Message, SqliteStorage<Json>, State>()
|
||||||
.dispatch_by::<State>();
|
.dispatch_by::<State>();
|
||||||
|
|
||||||
DispatcherBuilder::new(bot, handler)
|
DispatcherBuilder::new(bot, handler)
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub trait HandlerExt<Output> {
|
||||||
C: BotCommand + Send + Sync + 'static;
|
C: BotCommand + Send + Sync + 'static;
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
fn add_dialogue<Upd, S, D>(self) -> Self
|
fn enter_dialogue<Upd, S, D>(self) -> Self
|
||||||
where
|
where
|
||||||
S: Storage<D> + Send + Sync + 'static,
|
S: Storage<D> + Send + Sync + 'static,
|
||||||
<S as Storage<D>>::Error: Send,
|
<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
|
where
|
||||||
S: Storage<D> + Send + Sync + 'static,
|
S: Storage<D> + Send + Sync + 'static,
|
||||||
<S as Storage<D>>::Error: Send,
|
<S as Storage<D>>::Error: Send,
|
||||||
|
|
Loading…
Add table
Reference in a new issue