From 07d3f7a0f623724fcd3bcd2de3be7ffa3b87f6f6 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 28 Dec 2024 19:00:09 +0100 Subject: [PATCH] Remove unnecessary server config --- euphoxide-bot/src/bot.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/euphoxide-bot/src/bot.rs b/euphoxide-bot/src/bot.rs index f2a5574..4d36212 100644 --- a/euphoxide-bot/src/bot.rs +++ b/euphoxide-bot/src/bot.rs @@ -1,6 +1,6 @@ use std::{fmt::Debug, sync::Arc}; -use euphoxide_client::{MultiClient, MultiClientConfig, MultiClientEvent, ServerConfig}; +use euphoxide_client::{MultiClient, MultiClientConfig, MultiClientEvent}; use log::error; use tokio::sync::mpsc; @@ -8,31 +8,23 @@ use crate::command::Commands; #[non_exhaustive] pub struct Bot { - pub server_config: ServerConfig, pub commands: Arc>, pub clients: MultiClient, } impl Bot { pub fn new_simple(commands: Commands, event_tx: mpsc::Sender) -> Self { - Self::new( - ServerConfig::default(), - MultiClientConfig::default(), - commands, - event_tx, - ) + Self::new(MultiClientConfig::default(), commands, event_tx) } } impl Bot { pub fn new( - server_config: ServerConfig, clients_config: MultiClientConfig, commands: Commands, event_tx: mpsc::Sender, ) -> Self { Self { - server_config, commands: Arc::new(commands), clients: MultiClient::new_with_config(clients_config, event_tx), } @@ -56,7 +48,6 @@ where impl Clone for Bot { fn clone(&self) -> Self { Self { - server_config: self.server_config.clone(), commands: self.commands.clone(), clients: self.clients.clone(), }