From f9723361a0f2e0e361c027c638a20b5ab2b11d29 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Mon, 22 May 2023 11:58:41 +0200 Subject: [PATCH] Fix --- src/bots/approved_bot/modules/book.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bots/approved_bot/modules/book.rs b/src/bots/approved_bot/modules/book.rs index 73a4b61..b2af6be 100644 --- a/src/bots/approved_bot/modules/book.rs +++ b/src/bots/approved_bot/modules/book.rs @@ -280,7 +280,7 @@ pub fn get_book_handler() -> crate::bots::BotHandler { Update::filter_message() .chain(filter_command::()) .endpoint( - |message: Message, bot: CacheMe>, command: BookCommand, user_langs_cache: Cache>| async move { + |message: Message, bot: CacheMe>, command: BookCommand, app_state: AppState| async move { match command { BookCommand::Author { .. } => { send_book_handler( @@ -288,7 +288,7 @@ pub fn get_book_handler() -> crate::bots::BotHandler { bot, command, get_author_books, - user_langs_cache + app_state.user_langs_cache ) .await } @@ -298,7 +298,7 @@ pub fn get_book_handler() -> crate::bots::BotHandler { bot, command, get_translator_books, - user_langs_cache + app_state.user_langs_cache ) .await } @@ -308,7 +308,7 @@ pub fn get_book_handler() -> crate::bots::BotHandler { bot, command, get_sequence_books, - user_langs_cache, + app_state.user_langs_cache, ) .await }