From 88e60a2057f9cd41fdc9cf27114dcd155f2829c7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 8 Jul 2024 20:24:11 -0400 Subject: [PATCH] Add more polish --- src/bot.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index adc1088..c17c32f 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -173,7 +173,21 @@ impl Bot { "tell".to_string(), vec![ player_name.clone(), - format!("{item_id} costs {price} coins."), + format!("I buy {item_id} for {price} coins."), + ], + ); + + found = true; + } + } + + for (item_id, price) in &self.sell_prices { + if item_id.contains(item_name) { + self.client.send_command( + "tell".to_string(), + vec![ + player_name.clone(), + format!("I sell {item_id} for {price} coins."), ], ); @@ -184,7 +198,10 @@ impl Bot { if !found { self.client.send_command( "tell".to_string(), - vec![player_name.clone(), format!("I don't have that item.")], + vec![ + player_name.clone(), + format!("I don't have a price for that item."), + ], ); } }