mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fix
This commit is contained in:
@@ -12,7 +12,7 @@ use regex::Regex;
|
||||
use teloxide::{
|
||||
prelude::*,
|
||||
types::{InlineKeyboardButton, InlineKeyboardMarkup},
|
||||
utils::command::BotCommands,
|
||||
utils::command::BotCommands, adaptors::Throttle,
|
||||
};
|
||||
|
||||
use super::utils::{generic_get_pagination_keyboard, GetPaginationCallbackData};
|
||||
@@ -77,7 +77,7 @@ impl GetPaginationCallbackData for UpdateLogCallbackData {
|
||||
}
|
||||
}
|
||||
|
||||
async fn update_log_command(message: Message, bot: Bot) -> BotHandlerInternal {
|
||||
async fn update_log_command(message: Message, bot: Throttle<Bot>) -> BotHandlerInternal {
|
||||
let now = Utc::now().date_naive();
|
||||
let d3 = now - Duration::days(3);
|
||||
let d7 = now - Duration::days(7);
|
||||
@@ -134,7 +134,7 @@ async fn update_log_command(message: Message, bot: Bot) -> BotHandlerInternal {
|
||||
|
||||
async fn update_log_pagination_handler(
|
||||
cq: CallbackQuery,
|
||||
bot: Bot,
|
||||
bot: Throttle<Bot>,
|
||||
update_callback_data: UpdateLogCallbackData,
|
||||
) -> BotHandlerInternal {
|
||||
let message = match cq.message {
|
||||
@@ -223,7 +223,7 @@ pub fn get_update_log_handler() -> crate::bots::BotHandler {
|
||||
.chain(filter_callback_query::<UpdateLogCallbackData>())
|
||||
.endpoint(
|
||||
|cq: CallbackQuery,
|
||||
bot: Bot,
|
||||
bot: Throttle<Bot>,
|
||||
update_log_data: UpdateLogCallbackData| async move {
|
||||
update_log_pagination_handler(cq, bot, update_log_data).await
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user