mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fix total_pages == 0 bug
This commit is contained in:
@@ -163,9 +163,9 @@ where
|
||||
};
|
||||
|
||||
if items_page.total_pages == 0 {
|
||||
match bot.send_message(chat_id, "Книги не найдены!").send().await {
|
||||
Ok(_) => (),
|
||||
Err(err) => return Err(Box::new(err)),
|
||||
return match bot.send_message(chat_id, "Книги не найдены!").send().await {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => Err(Box::new(err)),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -246,9 +246,9 @@ where
|
||||
};
|
||||
|
||||
if items_page.total_pages == 0 {
|
||||
match bot.send_message(chat_id, "Книги не найдены!").send().await {
|
||||
Ok(_) => (),
|
||||
Err(err) => return Err(Box::new(err)),
|
||||
return match bot.send_message(chat_id, "Книги не найдены!").send().await {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => Err(Box::new(err)),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user