mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Use cache-me
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use teloxide::{prelude::*, adaptors::Throttle};
|
||||
use teloxide::{prelude::*, adaptors::{Throttle, CacheMe}};
|
||||
|
||||
use std::error::Error;
|
||||
|
||||
@@ -10,7 +10,7 @@ pub mod utils;
|
||||
|
||||
pub async fn message_handler(
|
||||
message: Message,
|
||||
bot: Throttle<Bot>,
|
||||
bot: CacheMe<Throttle<Bot>>,
|
||||
) -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||
let from_user = message.from().unwrap();
|
||||
let text = message.text().unwrap_or("");
|
||||
|
||||
Reference in New Issue
Block a user