This commit is contained in:
Raptorox 2026-07-27 23:44:35 +02:00
parent db4f7f9369
commit 37e89d6dc5
No known key found for this signature in database
GPG key ID: 8B3556FC3ED1F6D8
3 changed files with 26 additions and 1 deletions

20
src/command/list.rs Normal file
View file

@ -0,0 +1,20 @@
#[derive(Default)]
pub struct ListCommand {
uuids: bool
}
impl ListCommand {
pub fn uuids(mut self) -> Self {
self.uuids = true;
self
}
pub fn build(self) -> super::Command {
let uuids = self.uuids;
let mut s = format!("list");
if uuids {
s.push_str(" uuids");
}
super::Command(s)
}
}

View file

@ -1,6 +1,7 @@
pub struct Command(String);
mod say;
mod list;
impl Command {
pub fn raw(cmd: &str) -> Self {
@ -14,4 +15,8 @@ impl Command {
pub fn say() -> say::SayCommand {
say::SayCommand::default()
}
pub fn list() -> list::ListCommand {
list::ListCommand::default()
}
}

View file

@ -10,7 +10,7 @@ impl SayCommand {
}
pub fn build(self) -> super::Command {
let message= self.message;
let message = self.message;
let s = format!("say {message}");
super::Command(s)
}