Remove unused code

This commit is contained in:
2023-06-21 14:11:59 +02:00
parent 9e7922d03c
commit 2eb31baff6
2 changed files with 2 additions and 14 deletions

View File

@@ -3,16 +3,6 @@ use serde::Deserialize;
use crate::config; use crate::config;
#[derive(Deserialize, Debug, PartialEq, Clone, Copy)]
pub enum BotStatus {
#[serde(rename = "pending")]
Pending,
#[serde(rename = "approved")]
Approved,
#[serde(rename = "blocked")]
Blocked,
}
#[derive(Deserialize, Debug, PartialEq, Clone, Copy)] #[derive(Deserialize, Debug, PartialEq, Clone, Copy)]
pub enum BotCache { pub enum BotCache {
#[serde(rename = "original")] #[serde(rename = "original")]
@@ -25,7 +15,6 @@ pub enum BotCache {
pub struct BotData { pub struct BotData {
pub id: u32, pub id: u32,
pub token: String, pub token: String,
pub status: BotStatus,
pub cache: BotCache, pub cache: BotCache,
} }

View File

@@ -22,7 +22,7 @@ use url::Url;
use moka::future::Cache; use moka::future::Cache;
use self::bot_manager_client::get_bots; use self::bot_manager_client::get_bots;
pub use self::bot_manager_client::{BotCache, BotData, BotStatus}; pub use self::bot_manager_client::{BotCache, BotData};
use crate::config; use crate::config;
#[derive(Clone)] #[derive(Clone)]
@@ -87,9 +87,8 @@ impl BotsManager {
.unwrap_or_else(|_| panic!("Can't parse webhook url!")); .unwrap_or_else(|_| panic!("Can't parse webhook url!"));
log::info!( log::info!(
"Start bot(id={}) with {:?} handler, port {}", "Start bot(id={}) port {}",
bot_data.id, bot_data.id,
bot_data.status,
port port
); );