From 6cd9d71b4973e8760b53cad824214df35a0c8e59 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 8 Jul 2024 22:01:07 -0400 Subject: [PATCH] Add even more polish --- Dockerfile | 2 +- config.toml => config/config.toml | 0 src/bot.rs | 2 +- src/main.rs | 3 ++- 4 files changed, 4 insertions(+), 3 deletions(-) rename config.toml => config/config.toml (100%) diff --git a/Dockerfile b/Dockerfile index eb6d580..4d98223 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ COPY assets/ assets/ RUN chmod +x trade-bot -CMD ["./trade-bot"] +ENTRYPOINT ["./trade-bot"] diff --git a/config.toml b/config/config.toml similarity index 100% rename from config.toml rename to config/config.toml diff --git a/src/bot.rs b/src/bot.rs index c17c32f..cf75347 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -135,7 +135,7 @@ impl Bot { if self.last_announcement.elapsed() > Duration::from_secs(1200) { self.client.send_command( "region".to_string(), - vec!["I'm a bot. You can trade with me or use /say or /tell to check prices: 'price [item_name]'.".to_string()], + vec!["I'm a bot. You can trade with me or use /say or /tell to check prices: 'price [item_name]' or 'prices'.".to_string()], ); self.last_announcement = Instant::now(); diff --git a/src/main.rs b/src/main.rs index 60e77b0..eb65896 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,8 @@ fn main() { let config_path = args() .nth(1) .expect("Pass an argument specifying the config file"); - let file_content = read_to_string(config_path).expect("Failed to read config"); + let file_content = + read_to_string(&config_path).expect(&format!("Failed to read config at {config_path}")); toml::from_str::(&file_content).expect("Failed to parse secrets") };