refactor: move update function of the network client to the constructor

This commit is contained in:
2026-08-19 11:29:47 +02:00
parent bcb757b904
commit f2829efd6c
3 changed files with 96 additions and 107 deletions

View File

@@ -88,13 +88,11 @@ async fn run_bot() {
async fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::init();
let Some(mut client) = Client::new().await else {
let Some(mut client) = Client::new(None).await else {
println!("Not worky, ending");
return Ok(());
};
client.update();
let (stdin_sender, mut stdin_receiver) = mpsc::channel(1024);
let mut context: ClientContext = ClientContext::default();