From 2d3bdded944a361493ecd422aa16a1cc6a674a46 Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Tue, 2 Jul 2024 22:23:13 +0500 Subject: [PATCH] debug+correct links --- bots/xinuxmgr/src/functions/about.rs | 2 +- bots/xinuxmgr/src/functions/inline.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bots/xinuxmgr/src/functions/about.rs b/bots/xinuxmgr/src/functions/about.rs index 4e450ce..fea1bae 100644 --- a/bots/xinuxmgr/src/functions/about.rs +++ b/bots/xinuxmgr/src/functions/about.rs @@ -25,6 +25,6 @@ pub async fn command(bot: &Bot, msg: &Message) -> ResponseResult<()> { pub fn keyboard() -> InlineKeyboardMarkup { let mut keyboard = Keyboard::new(); keyboard - .url("Ochiq Havolalar", "https://github.com/xinuxuz/telegram") + .url("Ochiq Havolalar", "https://github.com/xinux-org/telegram") .unwrap() } diff --git a/bots/xinuxmgr/src/functions/inline.rs b/bots/xinuxmgr/src/functions/inline.rs index 3fe6986..615e9a1 100644 --- a/bots/xinuxmgr/src/functions/inline.rs +++ b/bots/xinuxmgr/src/functions/inline.rs @@ -31,10 +31,14 @@ pub async fn inline( pkgs: Pkgs, q: InlineQuery, ) -> Result<(), Box> { + println!("Inline request has reached to function"); + let parsed: String = q.query.clone(); let parsed = parsed.split_whitespace().collect::>(); + println!("Parsed: {:?}", parsed); + match parsed.len() { 0 => return_err_answer!(bot, q, "Qidirishni boshlang!", NO_INPUT), 1 => return_err_answer!(bot, q, "Parametrlar yetarli emas!", NOT_ENOUGH), @@ -42,6 +46,8 @@ pub async fn inline( 3.. => return_err_answer!(bot, q, "Parametrlar haddan ko'p!", TOO_MANY), } + println!("Inputs were checked successfully"); + match parsed[0] { "arch" => { let request = pkgs.search(parsed[1]).await; @@ -84,5 +90,7 @@ pub async fn inline( _ => return_err_answer!(bot, q, "Noto'g'ri distributiv!", NOT_FOUND), } + println!("Inline request has been processed successfully"); + Ok(()) }