This commit is contained in:
Jeff 2024-07-15 14:47:51 -04:00
parent 71337dc8c7
commit 31cfa10e0f

View File

@ -144,7 +144,7 @@ impl Bot {
/// processing trade actions. /// processing trade actions.
/// ///
/// This function should be modified with care. In addition to being the bot's main loop, it /// This function should be modified with care. In addition to being the bot's main loop, it
/// also accepts incoming trade invites, which has a potential for error if the bot accepts an /// invite while in the wrong trade mode. See the inline comments for more information. /// also accepts incoming trade invites, which has a potential for error if the bot accepts an /// invite while in the wrong trade mode.
pub fn tick(&mut self) -> Result<(), String> { pub fn tick(&mut self) -> Result<(), String> {
let veloren_events = self let veloren_events = self
.client .client
@ -207,7 +207,7 @@ impl Bot {
Ok(()) Ok(())
} }
// Consume and manage a client-side Veloren event. /// Consume and manage a client-side Veloren event.
fn handle_veloren_event(&mut self, event: VelorenEvent) -> Result<(), String> { fn handle_veloren_event(&mut self, event: VelorenEvent) -> Result<(), String> {
match event { match event {
VelorenEvent::Chat(message) => { VelorenEvent::Chat(message) => {
@ -383,10 +383,11 @@ impl Bot {
Ok(()) Ok(())
} }
// Make the bot's trading and help accouncements /// Make the bot's trading and help accouncements
// ///
// Currently, this can make two announcements: one in /region with basic usage instructions is // always made. If an announcement was provided when the bot was created, it will make it in /// Currently, this can make two announcements: one in /region with basic usage instructions
// /world followed by " at [location]." /// is always made. If an announcement was provided when the bot was created, it will make it
/// in /world.
fn handle_announcement(&mut self) -> Result<(), String> { fn handle_announcement(&mut self) -> Result<(), String> {
log::info!("Making an announcement"); log::info!("Making an announcement");