diff --git a/README.md b/README.md index c60283b..f8a4dff 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,11 @@ The bot is orientated towards admins of large Matrix rooms that are public and r ## How to run? **Using Docker:** - docker run -v /local/path/to/config.int:/config.ini -t matrix-modbot:latest +A minimal Docker image containing the compiled binary is published on [Docker Hub](https://hub.docker.com/r/davidlocalhost/matrix-modbot"). Note that this image is automatically pushed using a CI/CD Pipeline for every commit made to the main branch. Expect there to be bugs and breaking changes. +`sudo docker run -v /local/path/to/config.ini:/config.ini -t matrix-modbot:latest` **Using Cargo:** - cargo build --release - cargo run +``` +cargo build --release +cargo run /path/to/config.ini +``` diff --git a/src/main.rs b/src/main.rs index 953df03..e884240 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,10 +11,13 @@ pub use utils::utils::*; async fn main() { println!("Starting Matrix-Modbot"); let mut args: Vec = env::args().collect(); + if args.len() > 1 { + panic!("Please only pass in 1 argument!"); + } if args.is_empty() { args.push("config.ini".to_string()) // Set the default config file path to config.ini } let config_path = &args[0]; let creds = BotUserInfo::get_info(config_path).unwrap(); - Bot::bot_login(creds); + Bot::bot_login(creds).await; }