Add cache me

This commit is contained in:
2023-05-06 23:33:28 +02:00
parent 997bc4df22
commit 6dac2be859

View File

@@ -76,9 +76,10 @@ impl BotsManager {
async fn start_bot(&mut self, bot_data: &BotData) -> bool { async fn start_bot(&mut self, bot_data: &BotData) -> bool {
let bot = Bot::new(bot_data.token.clone()) let bot = Bot::new(bot_data.token.clone())
.set_api_url(config::CONFIG.telegram_bot_api.clone()) .set_api_url(config::CONFIG.telegram_bot_api.clone())
.throttle(Limits::default()); .throttle(Limits::default())
.cache_me();
let token = bot.inner().token(); let token = bot.inner().inner().token();
let port = self.bot_port_map let port = self.bot_port_map
.get(&bot_data.id) .get(&bot_data.id)
.unwrap_or_else(|| panic!("Can't get bot port!")); .unwrap_or_else(|| panic!("Can't get bot port!"));