refactor: clean up and restructure

This commit is contained in:
2025-02-16 01:10:48 -05:00
parent c4702a74f2
commit 645483c98f
15 changed files with 267 additions and 211 deletions

View File

@@ -19,13 +19,14 @@ pub struct CommandSource {
impl CommandSource {
pub fn reply(&self, message: &str) {
if self.message.is_whisper()
let response = if self.message.is_whisper()
&& let Some(username) = self.message.username()
{
self.client.chat(&format!("/w {username} {message}"));
&format!("/w {username} {message}")
} else {
self.client.chat(message);
}
message
};
self.client.chat(response);
}
pub fn _entity(&mut self) -> Option<Entity> {