From e5330cdec2882c93e253754a98cc44d49b43e062 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Fri, 4 Feb 2022 20:00:21 +0600 Subject: [PATCH] `HandlerExt::add_dialogue` => `HandlerExt::enter_dialogue` --- README.md | 2 +- examples/dialogue.rs | 2 +- examples/redis_remember.rs | 2 +- examples/sqlite_remember.rs | 2 +- src/dispatching2/handler_ext.rs | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6dc172ab..1933b2ce 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ async fn main() { DispatcherBuilder::new( bot, Update::filter_message() - .add_dialogue::, State>() + .enter_dialogue::, State>() .dispatch_by::(), ) .dependencies(dptree::deps![InMemStorage::::new()]) diff --git a/examples/dialogue.rs b/examples/dialogue.rs index 9a918025..e96892be 100644 --- a/examples/dialogue.rs +++ b/examples/dialogue.rs @@ -49,7 +49,7 @@ async fn main() { DispatcherBuilder::new( bot, Update::filter_message() - .add_dialogue::, State>() + .enter_dialogue::, State>() .dispatch_by::(), ) .dependencies(dptree::deps![InMemStorage::::new()]) diff --git a/examples/redis_remember.rs b/examples/redis_remember.rs index f287d00b..55bb2a16 100644 --- a/examples/redis_remember.rs +++ b/examples/redis_remember.rs @@ -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::, State>() + .enter_dialogue::, State>() .dispatch_by::(); DispatcherBuilder::new(bot, handler) diff --git a/examples/sqlite_remember.rs b/examples/sqlite_remember.rs index 77fba211..777c5bd8 100644 --- a/examples/sqlite_remember.rs +++ b/examples/sqlite_remember.rs @@ -40,7 +40,7 @@ async fn main() { let storage = SqliteStorage::open("db.sqlite", Json).await.unwrap(); let handler = Update::filter_message() - .add_dialogue::, State>() + .enter_dialogue::, State>() .dispatch_by::(); DispatcherBuilder::new(bot, handler) diff --git a/src/dispatching2/handler_ext.rs b/src/dispatching2/handler_ext.rs index 51c4d269..bcce99cc 100644 --- a/src/dispatching2/handler_ext.rs +++ b/src/dispatching2/handler_ext.rs @@ -24,7 +24,7 @@ pub trait HandlerExt { C: BotCommand + Send + Sync + 'static; #[must_use] - fn add_dialogue(self) -> Self + fn enter_dialogue(self) -> Self where S: Storage + Send + Sync + 'static, >::Error: Send, @@ -51,7 +51,7 @@ where })) } - fn add_dialogue(self) -> Self + fn enter_dialogue(self) -> Self where S: Storage + Send + Sync + 'static, >::Error: Send,