This commit is contained in:
2023-05-06 23:07:09 +02:00
parent cc7165eadd
commit 3802ac0c1f
5 changed files with 12 additions and 12 deletions

View File

@@ -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
},